Adobe.com
Contents Suites Classes Class Index Member Index

AIActionManagerSuite Struct Reference
[API Suite List]

The Action Manager suite allows you to access the internal scripting system built into Adobe Illustrator. More...

#include <AIActionManager.h>

List of all members.

Public Attributes

ASErr ASAPI(* RegisterActionEvent )(const char *eventName, const char *localizedName, ai::int32 version, ai::int32 flag, AIActionCallbackProc callback, SPPluginRef plugin, AIActionUserData userData, AIActionParamTypeRef parameters)
 This function registers a plug-in�s action event with the Adobe Illustrator application.
AIBoolean ASAPI(* IsActionEventRegistered )(const char *eventName)
 Reports whether a plug-in has been registered as an action event.
ASErr ASAPI(* GetActionEventLocalizedName )(const char *eventName, char *localizedName)
 Gets the localized name associated with a registered action event (the string that appears in the Actions palette).
ASErr ASAPI(* GetActionEventVersion )(const char *eventName, ai::int32 *version)
 Gets the version number associated with a registered action event.
ASErr ASAPI(* GetActionEventFlag )(const char *eventName, ai::int32 *flag)
 Currently unused.
ASErr ASAPI(* GetActionEventCallbackProc )(const char *eventName, AIActionCallbackProc *callback)
 Gets the callback procedure associated with a registered action event.
ASErr ASAPI(* GetActionEventPluginRef )(const char *eventName, SPPluginRef *pluginRef)
 Gets the plug-in associated with a registered action event--that is, the plug-in that executes the event.
ASErr ASAPI(* GetActionEventUserData )(const char *eventName, AIActionUserData *userData)
 Gets the user data associated with a registered action event.
ASErr ASAPI(* SetActionEventUserData )(const char *eventName, AIActionUserData userData)
 Sets the user data associated with a registered action event.
ASErr ASAPI(* GetActionEventParamType )(const char *eventName, AIActionParamTypeRef *param)
 Gets the type parameter block (TPB) associated with a registered action event.
ASErr ASAPI(* Idle )(void)
 Calls the action idle procedure, as set by SetActionIdleProc().
ASErr ASAPI(* SetActionIdleProc )(AIActionIdleProc idleProc)
 Specifies the action idle procedure for this action.
ASErr ASAPI(* GetActionIdleProc )(AIActionIdleProc *idleProc)
 Gets the current idle procedure for this action.
ASErr ASAPI(* AINewActionParamType )(AIActionParamTypeRef *param)
 Creates a type parameter block (TPB) for an action, which describes the data types of your plug-in�s parameters.
ASErr ASAPI(* AIDeleteActionParamType )(AIActionParamTypeRef param)
 Deletes a type parameter block (TPB).
ASErr ASAPI(* AIActionGetTypeKey )(AIActionParamTypeRef param, ai::uint32 index, ActionParamKeyID *key)
 Retrieves a type key from a type parameter block (TPB).
ASErr ASAPI(* AIActionHasTypeKey )(AIActionParamTypeRef param, ActionParamKeyID key, AIBoolean *hasKey)
 Determines whether a value parameter block (VPB) contains a particular key.
ASErr ASAPI(* AIActionGetTypeCount )(AIActionParamTypeRef param, ai::uint32 *count)
 Retrieves the number of keys in a type parameter block (TPB).
ASErr ASAPI(* AIActionSetTypeKey )(AIActionParamTypeRef param, ActionParamKeyID key, const char *name, ActionParamTypeID type, AIBoolean show)
 Associates a type key with a type parameter block (TPB).
ASErr ASAPI(* AIActionGetName )(AIActionParamTypeRef param, ActionParamKeyID key, char *value)
 Retrieves the display name of an event parameter.
ASErr ASAPI(* AIActionGetType )(AIActionParamTypeRef param, ActionParamKeyID key, ActionParamTypeID *value)
 Retrieves the data type of an event parameter.
AIBoolean ASAPI(* AIActionTypeIsShow )(AIActionParamTypeRef param, ActionParamKeyID key)
 Reports whether a specific event parameter is displayed in the Actions palette.
ASErr ASAPI(* AcquirePalette )(void)
 Not used for third-party plug-ins.
ASErr ASAPI(* ReleasePalette )(void)
 Not used for third-party plug-ins.
ASErr ASAPI(* RecordActionEvent )(const char *eventName, ActionDialogStatus dialogStatus, AIActionParamValueRef parameters)
 Records your plug-in�s action event and displays it in the Actions palette with its parameter list.
ASErr ASAPI(* PlayActionEvent )(const char *eventName, ActionDialogStatus dialogStatus, AIActionParamValueRef parameters)
 Plays back a recorded action event.
AIBoolean ASAPI(* InRecordMode )(void)
 Reports whether the user is currently in Record mode.
AIBoolean ASAPI(* InInsertMenuItemState )(void)
 Not used for third-party plug-ins.
ASErr ASAPI(* ActivateInsertMennuItemDialog )(void)
 Not used for third-party plug-ins.
ASErr ASAPI(* SetCurrentCommandLocalizedName )(const char *localizedName)
 Not used for third-party plug-ins.
ASErr ASAPI(* DoFunctionKey )(ai::int32 fkey, ai::uint32 modifier)
 Not used for third-party plug-ins.
ASErr ASAPI(* AINewActionParamValue )(AIActionParamValueRef *param)
 Creates a value parameter block (VPB) structure.
ASErr ASAPI(* AIDeleteActionParamValue )(AIActionParamValueRef param)
 Deletes a value parameter block (VPB).
ASErr ASAPI(* AIActionGetValueKey )(AIActionParamValueRef param, ai::uint32 index, ActionParamKeyID *key)
 Retrieves a value key from a value parameter block (VPB).
ASErr ASAPI(* AIActionHasValueKey )(AIActionParamValueRef param, ActionParamKeyID key, AIBoolean *hasKey)
 Determines whether a VPB contains a particular key.
ASErr ASAPI(* AIActionGetValueCount )(AIActionParamValueRef param, ai::uint32 *count)
 Retrieves the number of keys in a value parameter block (VPB).
ASErr ASAPI(* AIActionGetValueType )(AIActionParamValueRef param, ActionParamKeyID key, ActionParamTypeID *type)
ASErr ASAPI(* AIActionGetInteger )(AIActionParamValueRef param, ActionParamKeyID key, ai::int32 *value)
 Retrieves the integer value associated with a particular key in a VPB.
ASErr ASAPI(* AIActionSetInteger )(AIActionParamValueRef param, ActionParamKeyID key, ai::int32 value)
 Sets the integer value associated with a particular key in a VPB.
ASErr ASAPI(* AIActionGetReal )(AIActionParamValueRef param, ActionParamKeyID key, AIReal *value)
 Retrieves the real value associated with a particular key in a VPB.
ASErr ASAPI(* AIActionSetReal )(AIActionParamValueRef param, ActionParamKeyID key, AIReal value)
 Sets the real value associated with a particular key in a VPB.
ASErr ASAPI(* AIActionGetUnitReal )(AIActionParamValueRef param, ActionParamKeyID key, ActionParamUnitID *unit, AIReal *value)
 Retrieves the unit-real value associated with a particular key in a VPB.
ASErr ASAPI(* AIActionSetUnitReal )(AIActionParamValueRef param, ActionParamKeyID key, ActionParamUnitID unit, AIReal value)
 Sets the unit-real value associated with a particular key in a VPB.Unit-real values are displayed in the Actions palette with unit labels.
ASErr ASAPI(* AIActionGetString )(AIActionParamValueRef param, ActionParamKeyID key, char *value)
 Retrieves the string value associated with a particular key in a VPB.
ASErr ASAPI(* AIActionSetString )(AIActionParamValueRef param, ActionParamKeyID key, const char *value)
 Sets the string value associated with a particular key in a VPB.
ASErr ASAPI(* AIActionGetBoolean )(AIActionParamValueRef param, ActionParamKeyID key, AIBoolean *value)
 Retrieves the boolean value associated with a particular key in a VPB.
ASErr ASAPI(* AIActionSetBoolean )(AIActionParamValueRef param, ActionParamKeyID key, ASBoolean value)
 Sets the boolean value associated with a particular key in a VPB.
ASErr ASAPI(* AIActionGetEnumerated )(AIActionParamValueRef param, ActionParamKeyID key, char *name, ai::int32 *value)
 Retrieves the enumerated value associated with a particular key in a VPB.
ASErr ASAPI(* AIActionSetEnumerated )(AIActionParamValueRef param, ActionParamKeyID key, const char *name, ai::int32 value)
 Sets the enumerated value associated with a particular key in a VPB.
ASErr ASAPI(* AIActionSetRawDataBytes )(AIActionParamValueRef param, ActionParamKeyID key, ai::uint32 size, const char *value)
 Sets the raw-data value associated with a particular key in a VPB.
ASErr ASAPI(* AIActionGetRawDataSize )(AIActionParamValueRef param, ActionParamKeyID key, ai::uint32 *size)
 Retrieves the size of a raw-data value associated with a particular key in a VPB.
ASErr ASAPI(* AIActionGetRawData )(AIActionParamValueRef param, ActionParamKeyID key, char *value)
 Retrieves the raw-data value associated with a particular key in a VPB.
ActionValueVisibility ASAPI(* AIActionValueGetVisibility )(AIActionParamValueRef param, ActionParamKeyID key)
 Retrieves the current visibility state of a particular key in a VPB.
ASErr ASAPI(* AIActionValueSetVisibility )(AIActionParamValueRef param, ActionParamKeyID key, ActionValueVisibility value)
 Sets the visibility state of a particular key in a VPB.
ASErr ASAPI(* UndoLastTransaction )()
 Not used for third-party plug-ins.
ASErr ASAPI(* RedoLastTransaction )()
 Not used for third-party plug-ins.
ASErr ASAPI(* IgnoreRecording )(AIBoolean ignore)
 Not used for third-party plug-ins.
ASErr ASAPI(* RegisterActionEventUS )(const char *eventName, const ai::UnicodeString &localizedName, ai::int32 version, ai::int32 flag, AIActionCallbackProc callback, SPPluginRef plugin, AIActionUserData userData, AIActionParamTypeRef parameters)
 Registers an action using a Unicode name.
ASErr ASAPI(* GetActionEventLocalizedNameUS )(const char *eventName, ai::UnicodeString &localizedName)
 Retrieves the localized name of an event as a Unicode string.
ASErr ASAPI(* AIActionSetTypeKeyUS )(AIActionParamTypeRef param, ActionParamKeyID key, const ai::UnicodeString &name, ActionParamTypeID type, AIBoolean show)
 Associates a type key with a type parameter block (TPB), using Unicode strings.
ASErr ASAPI(* AIActionGetNameUS )(AIActionParamTypeRef param, ActionParamKeyID key, ai::UnicodeString &value)
 Retrieves the identifying name of an event as a Unicode string.
ASErr ASAPI(* SetCurrentCommandLocalizedNameUS )(const ai::UnicodeString &localizedName)
 Sets the localized name of an event using a Unicode string.
ASErr ASAPI(* AIActionGetStringUS )(AIActionParamValueRef param, ActionParamKeyID key, ai::UnicodeString &value)
 Retrieves the string value associated with a particular key in a VPB, as a Unicode string.
ASErr ASAPI(* AIActionSetStringUS )(AIActionParamValueRef param, ActionParamKeyID key, const ai::UnicodeString &value)
 Sets the string value associated with a particular key in a VPB, using a Unicode string.
ASErr ASAPI(* AIActionGetEnumeratedUS )(AIActionParamValueRef param, ActionParamKeyID key, ai::UnicodeString &name, ai::int32 *value)
 Retrieves the enumerated value associated with a particular key in a VPB, as a Unicode string.
ASErr ASAPI(* AIActionSetEnumeratedUS )(AIActionParamValueRef param, ActionParamKeyID key, const ai::UnicodeString &name, ai::int32 value)
 Sets the enumerated value associated with a particular key in a VPB, using a Unicode string.

Detailed Description

The Action Manager suite allows you to access the internal scripting system built into Adobe Illustrator.

The Action Manager allows you to record and play actions which execute Illustrator menu commands or plug-in commands. The Action Manager suite allows your plug-in to play actions or register itself to the Illustrator application to enable your plug-in to be scriptable via the Actions palette.

An action event is an execution of an Illustrator command. An action event can originate from the Illustrator application or a plug-in. It is normally, but not limited to, an evaluation or modification to Illustrator artwork. Adobe Illustrator�s Action Manager dispatches action events.

In order for your plug-in�s action events to be recorded or played back you must register them with the Action Manager and specify the parameters associated with your action event. In addition to registering you actions, your plug-in must respond to the Action Manager when it tells you to play your plug-in�s action event.

The Action Manager suite is exported by a plug-in. It may be disabled by removing the Action Manager plug-in. Because of this, during startup you must always check for the presence of the AIActionManager suite pointer before calling any Action Manager functions.


Member Data Documentation

Not used for third-party plug-ins.

Not used for third-party plug-ins.

Retrieves the boolean value associated with a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
value [out] A buffer in which to return the value.

Retrieves the enumerated value associated with a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
name [in] The name of the enumeration, as shown in the Actions palette.
value [out] A buffer in which to return the value.

Retrieves the enumerated value associated with a particular key in a VPB, as a Unicode string.

For details, see AIActionGetEnumeratedUS().

Retrieves the integer value associated with a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
value [out] A buffer in which to return the value.

Retrieves the display name of an event parameter.

Parameters:
param [in] The type parameter block (TPB), as created by AINewActionParamType() and returned by GetActionEventParamType().
key [in] The parameter type key, a 4-character long, See AIActionGetTypeKey().
value [out] A buffer in which to return the localizable name of the parameter, which appears in the Actions palette. See AIActionSetTypeKey().

Retrieves the identifying name of an event as a Unicode string.

For details, see AIActionGetNameUS().

Retrieves the raw-data value associated with a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
value [out] A buffer in which to return the value. You must allocate memory for the value, using the size obtained with AIActionGetRawDataSize().

Retrieves the size of a raw-data value associated with a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
size [out] A buffer in which to return the number of bytes in the value.

Retrieves the real value associated with a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
value [out] A buffer in which to return the value.

Retrieves the string value associated with a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
value [out] A buffer in which to return the value.

Retrieves the string value associated with a particular key in a VPB, as a Unicode string.

For details, see AIActionGetString().

Retrieves the data type of an event parameter.

Parameters:
param [in] The type parameter block (TPB), as created by AINewActionParamType() and returned by GetActionEventParamType().
key [in] The parameter type key, a 4-character long. See AIActionGetTypeKey().
value [out] A buffer in which to return the data type of the key. An ActionParamTypeID value.

Retrieves the number of keys in a type parameter block (TPB).

Use with AIActionGetTypeKey() to iterate through keys.

Parameters:
param [in] The type parameter block (TPB), as created by AINewActionParamType() and returned by GetActionEventParamType().
count [out] A buffer in which to return the number of keys.

Retrieves a type key from a type parameter block (TPB).

The returned key is, by convention, a 4-character long value that describes the parameter. For example, in the Tutorial the keys for the "corner" and "size" parameters are �crnr� and �size�. The key for the parameter type in the TPB matches the key for its value in the VPB: see AIActionGetValueKey().

Parameters:
param [in] The type parameter block (TPB), as created by AINewActionParamType() and returned by GetActionEventParamType().
index [in] The position index of the desired parameter type key.
key [out] A buffer in which to return the type key.

Retrieves the unit-real value associated with a particular key in a VPB.

Unit-real values are displayed in the Actions palette with unit labels.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
value [out] A buffer in which to return the value.

Retrieves the number of keys in a value parameter block (VPB).

Use with AIActionGetValueKey() to iterate through keys

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
count [out] A buffer in which to return the number of keys.

Retrieves a value key from a value parameter block (VPB).

The returned key is, by convention, a 4-character long value that describes the parameter. For example, in the Tutorial the keys for the "corner" and "size" parameters are �crnr� and �size�. The key for the parameter value in the VPB matches the key for its type in the TPB. See AIActionGetTypeKey().

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
index [in] The position index of the desired parameter value key.
key [out] A buffer in which to return the value key.

Determines whether a value parameter block (VPB) contains a particular key.

Parameters:
param [in] The type parameter block (TPB), as created by AINewActionParamType() and returned by GetActionEventParamType().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
hasKey [out] A buffer in which to return the result, true if the key is contained in the VPB, false otherwise.

Determines whether a VPB contains a particular key.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
hasKey [out] A buffer in which to return the result, true if the key is contained in the VPB, false otherwise.

Sets the boolean value associated with a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
value [in] The new value.

Sets the enumerated value associated with a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
name [in] The name of the enumeration, as shown in the Actions palette.
value [in] The new value.

Sets the enumerated value associated with a particular key in a VPB, using a Unicode string.

For details, see AIActionSetEnumeratedUS().

Sets the integer value associated with a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
value [in] The new value.

Sets the raw-data value associated with a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
size [in] The number of bytes in the new value.
value [in] The new value. You must allocate memory for the value.

Sets the real value associated with a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
value [in] The new value.

Sets the string value associated with a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
value [in] The new value.

Sets the string value associated with a particular key in a VPB, using a Unicode string.

For details, see AIActionSetString().

Associates a type key with a type parameter block (TPB).

Creates a new key, or sets values for an existing key.

Parameters:
param [in] The type parameter block (TPB), as created by AINewActionParamType() and returned by GetActionEventParamType().
key [in] The parameter type key, by convention a 4-character long value that describes the parameter. For example, in the Tutorial the keys for the "corner" and "size" parameters are �crnr� and �size�. See also AIActionGetTypeKey().
name [in] The localizable name of the parameter, which appears in the Actions palette.
type [in] The data type of the key. An ActionParamTypeID value.
show [in] When true, the parameter is shown in the Actions palette.

Associates a type key with a type parameter block (TPB), using Unicode strings.

For details, see AIActionSetTypeKey().

Sets the unit-real value associated with a particular key in a VPB.Unit-real values are displayed in the Actions palette with unit labels.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
value [in] The new value.

Reports whether a specific event parameter is displayed in the Actions palette.

(Note that the function returns a boolean value, not an error code.)

Parameters:
param [in] The type parameter block (TPB), as created by AINewActionParamType() and returned by GetActionEventParamType().
key [in] The parameter type key, a 4-character long. See AIActionGetTypeKey().
Returns:
True if the show flag is on, false otherwise.

Retrieves the current visibility state of a particular key in a VPB.

(Not that this function returns a visibility value, not an error code.)

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
Returns:
The visibility state value; see ActionValueVisibility.

Sets the visibility state of a particular key in a VPB.

Parameters:
param [in] The value parameter block (VPB), as created by AINewActionParamValue().
key [in] The parameter type key, a 4-character long. See AIActionGetValueKey().
value [in] The new value, see ActionValueVisibility.

Deletes a type parameter block (TPB).

You do not need to keep your reference; Illustrator keeps a copy of it, and you can retrieve it using GetActionEventParamType().

Parameters:
param [in] The type parameter block (TPB), as created by AINewActionParamType().
See also:
AIActionSetTypeKey(), RegisterActionEvent()

Deletes a value parameter block (VPB).

You do not need to keep your reference after recording or playing back an action with its parameter value set.

Parameters:
param The value parameter block (VPB) as returned by AINewActionParamValue().
See also:
RecordActionEvent(), PlayActionEvent()

Creates a type parameter block (TPB) for an action, which describes the data types of your plug-in�s parameters.

In order to register as an action event, your plug-in must create an AIActionParamTypeRef using this function, then fill it with keys that describe your parameter block using AIActionSetTypeKey(). Pass the filled TPB to RegisterActionEvent() when registering the event. Destroy it after registration, using AIDeleteActionParamType(). You do not need to keep your reference; Illustrator keeps a copy of it, and you can retrieve it using GetActionEventParamType().

The TPB does not contain actual values, just type descriptors. The keys that you add to the parameter block represent data types, typically for information that is gathered when your plug-in presents a modal dialog to the user. The values are kept in a value parameter block (VPB), created with AINewActionParamValue().

Parameters:
param [out] A buffer in which to return the new type parameter block (TPB).

Creates a value parameter block (VPB) structure.

The VPB contains a set of event parameter values, whose types are determined by the type parameter block (TPB) with which the event is registered. See RegisterActionEvent() and AINewActionParamValue().

In order to record an action event, your plug-in must create an AIActionParamValueRef using this function, then fill it with key/value pairs that contain values of the correct type, using the appropriate AIActionSetXx function. For example, to set an integer value, use AIActionSetInteger().

Pass the filled VPB to RecordActionEvent() when recording the event. Destroy it after recording, using AIDeleteActionParamValue(). You do not need to keep your reference; Illustrator keeps a copy of it, and you can retrieve it using AIActionGetValueKey().

Parameters:
param A buffer in which to return the new value parameter block (VPB).

Not used for third-party plug-ins.

Gets the callback procedure associated with a registered action event.

Parameters:
eventName [in] The name with which the action was registered.
version [out] A buffer in which to return the callback procedure.
See also:
RegisterActionEvent()
ASErr ASAPI(* AIActionManagerSuite::GetActionEventFlag)(const char *eventName, ai::int32 *flag)

Currently unused.

ASErr ASAPI(* AIActionManagerSuite::GetActionEventLocalizedName)(const char *eventName, char *localizedName)

Gets the localized name associated with a registered action event (the string that appears in the Actions palette).

Parameters:
eventName [in] The name with which the action was registered.
localizedName [out] A character buffer in which to return the localized name.
See also:
RegisterActionEvent()
ASErr ASAPI(* AIActionManagerSuite::GetActionEventLocalizedNameUS)(const char *eventName, ai::UnicodeString &localizedName)

Retrieves the localized name of an event as a Unicode string.

For details, see GetActionEventLocalizedName().

Gets the type parameter block (TPB) associated with a registered action event.

Parameters:
eventName [in] The name with which the action was registered.
version [out] A buffer in which to return the TPB.
See also:
RegisterActionEvent()
ASErr ASAPI(* AIActionManagerSuite::GetActionEventPluginRef)(const char *eventName, SPPluginRef *pluginRef)

Gets the plug-in associated with a registered action event--that is, the plug-in that executes the event.

Parameters:
eventName [in] The name with which the action was registered.
version [out] A buffer in which to return the plug-in reference..
See also:
RegisterActionEvent()
ASErr ASAPI(* AIActionManagerSuite::GetActionEventUserData)(const char *eventName, AIActionUserData *userData)

Gets the user data associated with a registered action event.

Parameters:
eventName [in] The name with which the action was registered.
version [out] A buffer in which to return the user data.
See also:
RegisterActionEvent()
ASErr ASAPI(* AIActionManagerSuite::GetActionEventVersion)(const char *eventName, ai::int32 *version)

Gets the version number associated with a registered action event.

Parameters:
eventName [in] The name with which the action was registered.
version [out] A buffer in which to return the version number.
See also:
RegisterActionEvent()

Gets the current idle procedure for this action.

Parameters:
idleProc [out] A buffer in which to return the procedure.

Calls the action idle procedure, as set by SetActionIdleProc().

Not used for third-party plug-ins.

Not used for third-party plug-ins.

Reports whether the user is currently in Record mode.

(Note that the function returns a boolean value, not an error code.)

When a new action is first created or whenever the record button is pressed in the Actions palette, the user is in Record mode, and all actions are recorded into the Actions palette.

If your plug-in registers an action event at startup, you are responsible for recording your action event and any associated parameters whenever the user is in Record mode. See RecordActionEvent().

This function is often used within a conditional statement during the normal execution of a plug-in. For example:

// If in record mode, record the event
if (sAIActionManager && sAIActionManager->InRecordMode()) {
// create a VPB
// load the VPB with values
// record the action event
// delete the VPB
}
Returns:
True if the user is in record mode, false otherwise.

Reports whether a plug-in has been registered as an action event.

(Note that this function returns a boolean value, not an error code.)

Parameters:
eventName The name with which the action was registered.
Returns:
True if the action was registered, false otherwise.
See also:
RegisterActionEvent()
ASErr ASAPI(* AIActionManagerSuite::PlayActionEvent)(const char *eventName, ActionDialogStatus dialogStatus, AIActionParamValueRef parameters)

Plays back a recorded action event.

You can use this to play back any registered action event, not just the one for this plug-in. The event names and their parameter types are documented in actions folder in the SDK installation.

For example, the following executes copy, new document, and paste action events:

sAIActionManager->PlayActionEvent("adobe_copy", kDialogNone, NULL);
sAIActionManager->PlayActionEvent("adobe_newDocument", kDialogNone, NULL);
sAIActionManager->PlayActionEvent("adobe_paste", kDialogNone, NULL);
Parameters:
eventName The name with which the action was registered. See RegisterActionEvent().
dialogStatus Whether a dialog appears by default when the action is played back. This status is visually represented by a dialog icon to the left of the event name in the Actions palette. See _ActionDialogStatus.
parameters The event�s value parameter block (VPB), as created by AINewActionParamValue(). This structure contains the parameter values that were used during the action event. Typically, these are the values entered by the user in the parameter dialog box. If your action event does not have parameters, pass null.
ASErr ASAPI(* AIActionManagerSuite::RecordActionEvent)(const char *eventName, ActionDialogStatus dialogStatus, AIActionParamValueRef parameters)

Records your plug-in�s action event and displays it in the Actions palette with its parameter list.

You should call this only when you have determined that the user is in Record mode, by calling InRecordMode(). You must create the VPB and set its values, use it to record the action, then destroy the VPB. For example:

// If in record mode, record the event
if (sAIActionManager && sAIActionManager->InRecordMode()) {
// create a VPB using AINewActionParamValue()
// load the VPB with values, according to the parameter types
// record the action event using RecordActionEvent()
// delete the VPB using AIDeleteActionParamValue()
}
Parameters:
eventName The name with which the action was registered. See RegisterActionEvent().
dialogStatus Whether a dialog appears by default when the action is played back. This status is visually represented by a dialog icon to the left of the event name in the Actions palette.
parameters The event�s value parameter block (VPB), as created by AINewActionParamValue(). This structure contains the parameter values that were used during the action event. Typically, these are the values entered by the user in the parameter dialog box. If your action event does not have parameters, pass null.

Not used for third-party plug-ins.

ASErr ASAPI(* AIActionManagerSuite::RegisterActionEvent)(const char *eventName, const char *localizedName, ai::int32 version, ai::int32 flag, AIActionCallbackProc callback, SPPluginRef plugin, AIActionUserData userData, AIActionParamTypeRef parameters)

This function registers a plug-in�s action event with the Adobe Illustrator application.

Call it during the startup procedure of your plug-in. This is necessary for your plug-in event to be recognized by the Actions palette. It is the first step in making your plug-in into an action.

The Action Manager suite is exported by a plug-in. It may be disabled by removing the Action Manager plug-in. Because of this, during startup you must always check for the presence of the AIActionManager suite pointer before calling any Action Manager functions.

If your plug-in registers an action event at startup, you are responsible for recording your action event and any associated parameters whenever the user is in Record mode.See InRecordMode() and RecordActionEvent().

Parameters:
eventName A string that identifies your plug-in event internally; not localized. Must be unique among plug-ins. Typically the name of your plug-in, preceded by your company name; for example, "adobe_saveDocumentAs".
localizedName A string that is shown in the Adobe Illustrator Actions palette; will be localized.
callback Not used, pass a null value.
plugin The plug-in registering the event (usually message.d->self).
userData A pointer to private data associated with the action event. Must be allocated by your plug-in (using SPBlocks.h) at startup. This is passed back to your code in GetActionEventUserData and in the DoActionMessage.
parameters A reference to a type parameter block (TPB). A TPB contains keys that describe the parameter block of your plug-in. To provide this value:

ASErr ASAPI(* AIActionManagerSuite::RegisterActionEventUS)(const char *eventName, const ai::UnicodeString &localizedName, ai::int32 version, ai::int32 flag, AIActionCallbackProc callback, SPPluginRef plugin, AIActionUserData userData, AIActionParamTypeRef parameters)

Registers an action using a Unicode name.

For details, see RegisterActionEvent().

Not used for third-party plug-ins.

ASErr ASAPI(* AIActionManagerSuite::SetActionEventUserData)(const char *eventName, AIActionUserData userData)

Sets the user data associated with a registered action event.

Parameters:
eventName [in] The name with which the action was registered.
version [in] The new user data, in the structure allocated at registration.
See also:
RegisterActionEvent()

Specifies the action idle procedure for this action.

Parameters:
idleProc The procedure to call when the action is idle. Define the function using this prototype:
typedef void AIActionIdleProc (void);
ASErr ASAPI(* AIActionManagerSuite::SetCurrentCommandLocalizedName)(const char *localizedName)

Not used for third-party plug-ins.

Sets the localized name of an event using a Unicode string.

For details, see SetCurrentCommandLocalizedName().

Not used for third-party plug-ins.


The documentation for this struct was generated from the following file:


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2016 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks