Photoshop Applescript fails , why?

Sivakatirswami katir at
Fri Oct 29 11:18:36 EDT 2010

  On 10/28/10 5:36 PM, Terry Judd wrote:
> What happens if you use system events to activate Photoshop first and then
> tell Photoshop to do its action?
> tell application "System events" to tell application "Adobe Photoshop CS5"
> to activate
> tell application "Adobe Photoshop CS5" to do action [action] from [set]
> Terry...
using the QA center works! Mark replied that he thought there must be a 
bad character in the script... I have no idea why cutting and pasting 
from Script would introduce  char that causes LiveCode to 
fail to compile the applescript... but a "hard wired" approach works:

  local tScript
   put merge("tell application [[quote]]Adobe Photoshop CS5[[quote]]") & 
return after tScript
   put merge("activate") & return after tScript
   put merge("do action [[quote]]merge leaves[[quote]] from 
[[quote]]Merge Leaves[[quote]]") & return after tScript
   put merge("end tell") & return after tScript
   do tScript as "applescript"

Case closed for now.

I opened a new thread for the next leg of this adventure: looping


More information about the Use-livecode mailing list