I’m told that InDesign AppleScripts that worked a year or so ago are now having this problem: dialogs don’t appear, the “show” command just returns immediately with a “Cancel button was hit” status. If I remember correctly, we ran CS then and are now under CS2, if that’s significant.
I’ve taken this script pretty much verbatim from the InDesign script user’s guide:
tell application "Adobe InDesign CS2"
set myDialog to make dialog with properties {name:"Simple Dialog"}
tell myDialog
tell (make dialog column)
make static text with properties {static label:"This is a very simple dialog box."}
end tell
end tell
set myResult to show myDialog
if myResult is true then
display dialog ("You clicked the OK button")
else
display dialog ("You clicked the Cancel button")
end if
end tell
and sure enough the dialog box never appears but I get the “You clicked the Cancel button” message. Can someone tell me what simple thing I’m overlooking? I’m very rusty with AppleScript so I’m sure it’s something very obvious, it’s just gotten frustrating.
Thanks very much…
- Dan