Copy link to clipboard
Copied
HI
I have what seems on the face of it to be an easy task. I need to convert rgb tiffs to index colour. I have created an actioncalled Action 4, consisting of
Convert Mode
To index color Mode
Palette: Mac OS system
This runs fine from Photoshop but when I try and script up this action in Applescropt using the routine
tell application "Adobe Photoshop CS"
activate
do action "Action 4"
end tell
I get the error "Adobe Photoshop CS got an error: Illegal argument - argument 2 - Required value is missing"
Anyone got any thoughths about this ???
Copy link to clipboard
Copied
Try adding the action set that contains "Action 4"
do action "Action 4" from "whatever set"
Copy link to clipboard
Copied
Hi
Thanks for the reply and I did try what you had suggested but I am still getting the error. It seems to be happening no matter what action I call from the applescript and I cannot as yet get my head around why
Copy link to clipboard
Copied
The action name and actionset are case sensitive, also any spaces before or after the name must be included.
Copy link to clipboard
Copied
Both Paul and Mike are correct here you need to include both the action and the set names these are case sensitive so I almost always C&P them out of the double click edit box. I don't however see why you need an action at all? This is directly scriptable like so…
tell application "Adobe Photoshop CS2"
set Doc_Ref to current document
tell Doc_Ref
if mode is RGB then change mode to indexed color with options ¬
{class:indexed mode options, palette:Mac OS system}
end tell
end tell
Copy link to clipboard
Copied
Hi All
Thanks for the replies and I have now been able to get the script working in the way that I wanted it to
Find more inspiration, events, and resources on the new Adobe Community
Explore Now