In my application I want to use the wizard technique in guiding the users in the process of creating a footnote for any given statement in a unlocked text field. The plan is for the user to click a button that opens a substack, which is the wizard. The first card of the wizard tells the user to click at the location where the footnote reference should be. A selectionChanged handler in the field captures the location and creates a custom property of the field that the wizard can access ("cSelectedChunk" in the code snippet).
Code: Select all
on mouseUp
open stack "footnoteMaker" as modeless --code must pause here until the user clicks
put the cSelectedChunk of fld "field" into tSelectedChunk
. . .
However, as commented above, the script needs to pause after the substack "footnoteMaker" opens so that the user can click in the field and the selectionChanged handler can be triggered. However, (correct me if I'm wrong here), making the substack modeless doesn't pause the script. Making it modal or a palette blocks interaction with the field. I see no "pause" command in the dictionary. Thank you for your suggestions in pausing the script or any other solution.
Monty