Photoshop Applescript fails , why?
katir at hindu.org
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]
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 Editor.app would introduce char that causes LiveCode to
fail to compile the applescript... but a "hard wired" approach works:
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