i have record a script with scriptlistner . i want to run this script from VB program but it fails on last line, by saying " saying that this feature may not be available for this version of photoshop ,action COLOR not found. i am new to scripts, i don't know what? is COLOR.ATN file is needed in my vb project if yes how to tell vb about this file format and where should i keep this?
Here is my code:
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM id21
id21 = objApp.CharIDToTypeID( "Ply " )
DIM desc7
SET desc7 = CreateObject( "Photoshop.ActionDescriptor" )
DIM id22
id22 = objApp.CharIDToTypeID( "null" )
DIM ref4
SET ref4 = CreateObject( "Photoshop.ActionReference" )
DIM id23
id23 = objApp.CharIDToTypeID( "Actn" )
Call ref4.PutName( id23, "LEVEL LOW" )
DIM id24
id24 = objApp.CharIDToTypeID( "ASet" )
Call ref4.PutName( id24, "COLOR" )
Call desc7.PutReference( id22, ref4 )
Call objApp.ExecuteAction( id21, desc7, dialogMode )
How to run Photoshop Script from VB2008
-
Mike Hale
How to run Photoshop Script from VB2008
That code is trying to play an action in the Photoshop Action Panel. You are getting that error because there is no action with that name in the panel. If you do see the action in the panel make sure there are no extra spaces in the names in the panel and that the case match( all uppercase ).
But if you are tying to share this script with users that don't already have the action you will need to share the atn file as well as the jsx. I would make loading the atn part of the script install. I don't think you want to load the action every time the script runs.
But if you are tying to share this script with users that don't already have the action you will need to share the atn file as well as the jsx. I would make loading the atn part of the script install. I don't think you want to load the action every time the script runs.
-
Akhtar Ahmed
How to run Photoshop Script from VB2008
Thanks for Reply.
Can i make a VB script which runs without loading the PS action file .
or is it possible to keep ATN part in my vb project so that i can load it when needed and remove from panel when done.
Can i make a VB script which runs without loading the PS action file .
or is it possible to keep ATN part in my vb project so that i can load it when needed and remove from panel when done.
-
Paul MR
How to run Photoshop Script from VB2008
Have a look at this thread, you might be able to adapt the script written by Mikaeru.
http://forums.adobe.com/thread/1069624
It lets you run an action without loading the atn file.
http://forums.adobe.com/thread/1069624
It lets you run an action without loading the atn file.