I work in a magazine publishing prepress environment. I’ve been developing a script that works between Adobe InDesign and Adobe Photoshop that opens selected images placed in the InDesign document, resizes them and rotates them so as they are at 100% scale and 0 degrees rotation in the InDesign document, and crops out extraneous portions of the image. All this works well.
I took this script into AppleScript Studio so as I could elegantly add a progress bar and means of canceling, should the user decide to do so.
The progress bar was no problem - I created a second NIB file, called “load nib” and got handles to all the elements I needed.
My problem is how do I get the script to recognise that the user has pressed the Cancel button and exit the repeat loop in an orderly fashion without leaving an image half processed . Cmd-period will halt the script, but can leave things half finished state, and besides, it’s not as friendly as a Cancel button.
Any suggestions?