I'm writing a script that needs to trigger spell check, wait for the user to click 'done', and then continue on with the rest of the script. Here's a little script to illustrate the problem.
Dim menuSpelling, menuEdit, myInDesign
Set myInDesign = CreateObject("InDesign.Application.CS3")
Set menuEdit = myInDesign.Menus.Item("Main").MenuElements.Item("Edit")
Set menuSpelling = menuEdit.MenuElements.Item("Spelling").MenuElements.Item ("Check Spelling...")
Rem WAIT FOR 'DONE' TO BE CLICKED
MsgBox("Now you cant interact with the spell checking dialog")
'PreFlight function is run here
Set myindesign = Nothing
So when the script is run, it just keeps rolling after opening the spellcheck dialog. When the next dialog opens, the user cant interact with the spellcheck dialog.
Can i capture the event when the 'Done' button has been clicked? Any other ideas?