photoshop action : "do action" rejected by apple script

Hallo,
I cannot get apple script to run a photoshop action.
OSX 10.4.8
Photoshop CS (8)
Apple script 2.1.1(81)
My action changes the ITPC info then saves and closes the image. I want to be able to control click a folder and change the ITPC info for all files in the folder.
I have tried copying various solved answers from the forum and compiling them in order to rewrite them to fit my needs But Apple script stumbles at "do action" and tells me " expected end of line but found identifier "
This script was adapted form a solved answer on the forum:


TIA
Martin

set inputFolder to choose folder with prompt "Please choose the folder containing Images" --without invisibles

tell application "Finder"
--filesList is list of images
set filesList to files in inputFolder

end tell

repeat with aFile in filesList
tell application "Finder"
set theFile to aFile as alias
end tell
tell application "Adobe Photoshop CS"
open theFile
tell front document
do action "fotoname" from "MCACTIONS"
end tell
end tell
end repeat

EMAC, Mac OS X (10.4.8)

Posted on Mar 9, 2007 11:03 AM

Reply
4 replies

Mar 10, 2007 7:00 AM in response to softmartin

Thanks for your in put.
If I comment out the finder part of the applescript, I can get the photoshop action to work using the command "do script" . However I now have an error with the Finder part of the script; PS cannot open the alias which Finder gives it.

Adobe Photoshop CS got an error: alias "Macintosh HD:Users:MC:Pictures:GJ2A7887.jpg" doesn't understand the open message.

My script looks like this right now :

set inputFolder to choose folder with prompt "Please choose the folder containing Images" --without invisibles
tell application "Finder"
--filesList is list of images
set filesList to files in inputFolder

end tell

repeat with aFile in filesList
tell application "Finder"
set theFile to aFile as alias
end tell
tell application "Adobe Photoshop CS"
activate
--set displaying dialogs to never
open theFile
tell front document
do script "fotoname"
end tell
end tell
end repeat

You advised me to check the Photoshop script library; this seems to be empty ( Script Editor> Open Dictionary)
Appreciate any further help !!
Thanks Martin

Mar 10, 2007 11:29 AM in response to softmartin

When I bought Photoshop it had very little appleScript support. I downloaded and installed something, possibly from the Adobe site, no charge. The dictionary now shows 9 Suites: Core (12 items), Photoshop (56 items), Open Formats (4), Save Formats (16), Filter (38), Adjustment (14), Color (9), and Miscellaneous Standards (7). The last has the "do action" command. You might get more help from an Adobe bulletin board.

Mar 27, 2007 12:14 PM in response to softmartin

Hello Tia Martin,
Tente este Script Por aqui funciona.
Bom escrever em Proyugues não?
Mas cuidaddo tenho uma linha final que deleta os arquivos.
Se você não quer que isto aconteça fina lize a linha antes.

Boa sorte

Sidnei


property speak_alert : false -- if true, the script will speak the alert. If false, the script will display an alert dialog
property dialog_timeout : 30 -- set the amount of time before dialogs auto-answer.

property copy checksindicator : false

property item check_delaytime : 2
property folder check_delaytime : 3
property special labelindex : 7
on adding folder items to this_folder after receiving added_items
if copy checksindicator is true then
set the added_items to my check addeditems(the added_items)
if the added_items is {} then return "no vaild items"
end if
set input to choose folder
tell application "Finder"
set filesList to files in input
end tell
repeat with aFile in filesList
set fileIndex to 0
tell application "Finder"
set theFile to aFile as alias
set theFileName to name of theFile
end tell
tell application "Adobe Photoshop CS"
activate
set display dialogs to never
open theFile
tell the current document
--
do action "fotoname" from "MCACTIONS"
--
tell application "Finder" to delete file theFile
end tell
end tell
end repeat
end adding folder items to

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

photoshop action : "do action" rejected by apple script

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.