Script flunks Xcode

My script reads (in part):

tell application “Adobe Photoshop CS5”
do action “abc” from “def”
end tell

This script works in Applescript editor, but when it’s pasted into an Xcode project, the script doesn’t build; I get the dreaded “Expected end of line but found identifier. (-2741)”

When the script reads:

tell application “Adobe Photoshop CS5”
quit
end tell

there are no problems. What gives???

Model: MacPro
AppleScript: 2.1.2
Browser: Safari 533.16
Operating System: Mac OS X (10.6)

I’ve only got CS4 here, but it works fine and I’d be surprised if they changed to codes for it. What happens if you type it rather than copying it?

Thanks Shane! Typing worked.

Today I encountered the same problem that I had earlier: my short bit of code,

tell application “Adobe Photoshop5”
do action “abc” from “def”
end tell

refused to compile, both in the Applescript Editor and in Xcode.

I tried retyping the code, but that didn’t work.

Then I restarted the computer, and that worked.

Hopefully, others can learn from this.

Also remember (or if you didn’t know) Photoshop CS5 v12.00 has MAJOR scripting problems. You MUST upgrade to v12.01.

Thanks SuperMacGuy; I didn’t know about the upgrade. Adobe should have told me.

Model: MacPro
AppleScript: 2.1.2
Browser: Safari 533.16
Operating System: Mac OS X (10.6)