Save sequential tiffs open documents (Photoshop)

Whilst not exactly what you want to achieve this example has a lot of the ingredients and demonstrates using batchPlay and executeAsModal, two core UXP concepts, alongside JS asynchronous code.