Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Applescript & Automator- display dialog title

I'm trying to make an Automator service. For one of the steps I would like to use an Applescript that looks something like the one below.

set dpaste to "Enter a title, press tab, add some text, and click Continue when you're done."
set dialog_title to "Post To Blog"
set dpastedialog to display dialog dpaste with title dialog_title with icon 1 buttons {"Cancel", "Continue"} default button 2
if button returned of dpastedialog is "Continue" then
tell application "System Events"
activate
keystroke "v" using command down
end tell
end if

However, the line "set dpastedialog to display dialog dpaste with title dialog_title" seems to be giving Automator some trouble. Whenever I try to compile/run the script, I get the following error message from Automator: "Expected end of line, etc. but found identifier" with the variable "dialog_title" selected.
When I run this script from Applescript Editor I get no trouble.

Thanks!

Mac OS X (10.6.4)

Posted on Sep 26, 2010 3:59 PM

Reply
Question marked as Best reply

Posted on Sep 26, 2010 4:56 PM

Test the script in the AppleScript Editor until you resolve the issue. Alternatively, post to the AppleScript forum under OS X Technologies.
1 reply

Applescript & Automator- display dialog title

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.