Optional parameters are indicated in the table by square brackets ([]). See ‘Working with Method Parameters’ on page 7 for information on using parameters.
●
Return value type(s)
●
A description, if applicable
6
Adobe Photoshop CS2
VBScript Scripting Reference
VBScript Interface 7
Method
Parameter Type
Returns
What it does
ExecuteAction
ActionDescriptor
Plays an ActionManager event.
Number (Long)
(EventID
ActionDescriptor
[, Descriptor]
PsDialogModes
[, DisplayDialogs])
Working with Method Parameters
Optional parameters are surrounded by square brackets ( [ ] ). In the following Methods table sample, the parameters Descriptor and DisplayDialogs are optional and the parameter EventID is not. See Therefore, if you use the ExecuteAction() method for the object associated with the sample Methods table above, you must include an EventID value in the Parentheses following the method name. The EventID value must be a number, as indicated by the Number (Long) in the table’s Parameter Type column.
If you use an optional parameter, you must separate the parameters with a comma, as indicated by the comma that precedes each optional parameter in the table.
Also, if you use an optional parameter, you must enter the values in the order they are listed in the table so that the JavaScript compiler knows which value you are entering. To skip an optional parameter, insert an extra comma to act as a placeholder.
The following sample provides values for an EventID and a DisplayDialog, but skips the Descriptor parameter (represented by the empty value between two commas). The statement executes action #4233
and allows only error type dialog boxes to be displayed.
appRef.ExecuteAction(4233,,Error)
Adobe Photoshop CS2
VBScript Scripting Reference
VBScript Interface 8
ActionDescriptor
A record of key-value pairs for actions, such as those included on the Adobe Photoshop CS2 Actions menu.
Note: The ActionDescriptor class is part of the Action Manager functionality. See ‘Action Manager’ on
page 145.
Properties
Property
Value Type
What it is
Application
Object (Application) Read-only. The application that the collection belongs to.
Count
Number (Long)
Read-only. The number of keys contained in the descriptor.
typename
String
Read-only. The class name of the referenced
ActionDescriptor object.
Methods
Method
Parameter Type
Returns
What it does
Clear
Clears the descriptor.
()
Erase
Erases a key from the descriptor.
Number (Long)
(Key)
GetBoolean
Boolean
Gets the value of a key of type
Number (Long)
(Key)
boolean.
GetClass
Number (Long)
Gets the value of a key of type
Number (Long)
(Key)
class.
GetDouble
Number (Double)
Gets the value of a key of type
Number (Long)
(Key)
double.
GetEnumerationType
Number (Long)
Gets the enumeration type of a
Number (Long)
(Key)
key.
GetEnumerationValue
Number (Long)
Gets the enumeration value of a
Number (Long)
(Key)
key.
GetInteger
Number (Long)
Gets the value of a key of type
Number (Long)
(Key)
integer.
GetKey
Number (Long)
Gets the ID of the N th key.
Number (Long)
(Index)
GetList
ActionList
Gets the value of a key of type list.
Number (Long)
(Key)
GetObjectType
Number (Long)
Gets the class ID of an object in a
Number (Long)
(Key)
key of type object.
Adobe Photoshop CS2
VBScript Scripting Reference
VBScript Interface 9
Method
Parameter Type
Returns
What it does (Continued)
GetObjectValue
ActionDescriptor
Gets the value of a key of type
Number (Long)
(Key)
object.
GetPath
file
Gets the value of a key of type
Number (Long)
(Key)
Alias.
GetReference
ActionReference
Gets the value of a key of type
Number (Long)
(Key)
ActionReference.
GetString
String
Gets the value of a key of type
Number (Long)
(Key)
String.
GetType
PsDescValueType
Gets the type of a key.
Number (Long)
(Key)
GetUnitDoubleType
Number (Long)
Gets the unit type of a key of type
Number (Long)
(Key)
UnitDouble.
GetUnitDoubleValue
Number (Double)
Gets the value of a key of type
Number (Long)
(Key)
UnitDouble.
HasKey
Boolean
Checks whether the descriptor
Number (Long)
(Key)
contains the provided key.
IsEqual
Boolean
Determines whether the
ActionDescriptor
(otherDesc)
descriptor is the same as another
descriptor.
PutBoolean
Sets the value for a key whose type
Number (Long)
(Key,
is Boolean.
Boolean
Value)
PutClass
Sets the value for a key whose type
Number (Long)
((Key,
is class.
Number (Long)
Value)
PutDouble
Sets the value for a key whose type
Number (Long)
(Key,
is double.
Number (Double)