Nate Silva

Aug 25 2006

How to make a responsive cancel button in an AppleScript Studio application

Select the Application launched handler

I’m new to AppleScript and AppleScript Studio and I wanted to make script that shows a simple dialog with a progress indicator and a cancel button. The script begins a lengthy process that can take 30-60 seconds. If the user clicks the cancel button it should terminate immediately.

I found that the cancel button was unresponsive until the end of the script. The solution, weirdly, was to turn on the Application “launched” handler in Interface Builder. Even if the handler doesn’t have any code in it, it makes the cancel button responsive for some reason.

Found on: MacScripter BBS

Page 1 of 1