1 Reply Latest reply: Sep 26, 2010 4:56 PM by baltwo
Moolivia Level 1 Level 1 (0 points)
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)