How to script Photoshop CS2 to make a smart object out of a layer selected?
How to script Photoshop CS2 to make a smart object out of a layer selected?
- Subject: How to script Photoshop CS2 to make a smart object out of a layer selected?
- From: "Patrik B." <email@hidden>
- Date: Tue, 20 Feb 2007 23:39:08 -0800
Hi,
I am trying to run the following code but get an error -35 missing semicolon.
Probably my syntax is wrong. Please advise. It seems like I am not really
selecting the layer and therefore my script or my action does not run.
The javascript basically says "var xx = stringIDToTypeID ( "newPlacedLayer");
executeAction ( xx, undefined, DialogModes.NO );
tell application "Adobe Photoshop CS2"
activate
set scriptFile to "G5:Applications:Adobe Photoshop CS2:Smartobject.js"
set mydoc to current document
set alllayers to layers of document 1
set namesalllayers to name of every layer of document 1
set myreply to items of (choose from list namesalllayers with multiple
selections allowed)
repeat with i in alllayers
if name of i is in (myreply as text) then
set current layer of mydoc to i
do javascript scriptFile
end if
-- do action smartObjectx2
end repeat
end tell
Best, Patrik
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden