admin管理员组

文章数量:1571372

文章目录

    • 1.AIActionManagerSuite
    • 2.作者答疑

1.AIActionManagerSuite

  Action Manager Suite允许您访问adobe illustrator内建的内部脚本系统。动作管理器允许您记录和播放执行Illustrator菜单命令或插件命令的动作。 Action Manager Suite允许您的插件播放动作,或者将自己注册到Illustrator应用程序,从而使您的插件可以通过动作面板编写脚本。动作事件是一个Illustrator命令的执行。动作事件可以起源于Illustrator应用程序或插件。它通常是,但不限于,评估或修改插图画家的作品。Adobe Illustrator的动作管理器分派动作事件。为了记录或回放插件的操作事件,必须将它们注册到Action Manager,并指定与操作事件相关的参数。除了注册您的操作之外,当Action Manager告诉您播放插件的操作事件时,插件必须响应Action Manager。Action Manager套件由插件导出。它可以通过删除Action Manager插件来禁用。因此,在启动过程中,在调用任何ActionManager函数之前,必须始终检查Action Manager Suite指针的存在。使用带有常量kAIActionManagerSuite和kAIActionManagerVersion的SPBasicSuite::AcquireSuite()获取此套件。

ASErr ASAPI(*  RegisterActionEvent )(const char *eventName, const char *localizedName, int version, int flag, AIActionCallbackProc callback, SPPluginRef plugin, AIActionUserData userData, AIActionParamTypeRef parameters) 
  This function registers a plug-in’s action event with the Adobe Illustrator application. 
 
ASBoolean 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, int *version) 
  Gets the version number associated with a registered action event. 
 
ASErr ASAPI(*  GetActionEventFlag )(const char *eventName, int *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, ASBoolean *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, ASBoolean 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. 
 
ASBoolean 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. 
 
ASBoolean ASAPI(*  InRecordMode )(void) 
  Reports whether the user is currently in Record mode. 
 
ASBoolean 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 )(int 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, ASBoolean *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, ASReal *value) 
  Retrieves the real value associated with a particular key in a VPB. 
 
ASErr ASAPI(*  AIActionSetReal )(AIActionParamValueRef param, ActionParamKeyID key, ASReal value) 
  Sets the real value associated with a particular key in a VPB. 
 
ASErr ASAPI(*  AIActionGetUnitReal )(AIActionParamValueRef param, ActionParamKeyID key, ActionParamUnitID *unit, ASReal *value) 
  Retrieves the unit-real value associated with a particular key in a VPB. 
 
ASErr ASAPI(*  AIActionSetUnitReal )(AIActionParamValueRef param, ActionParamKeyID key, ActionParamUnitID unit, ASReal 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, ASBoolean *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 )(ASBoolean ignore) 
  Not used for third-party plug-ins. 
 
ASErr ASAPI(*  RegisterActionEventUS )(const char *eventName, const ai::UnicodeString &localizedName, int version, int 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, ASBoolean 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.  

2.作者答疑


  如有疑问,请留言。

本文标签: 插件模块动作illustratorAIActionManagerSuite