• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

sendScriptMessage

Valorous Hero ,
May 14, 2012 May 14, 2012

Copy link to clipboard

Copied

Hey yall, 

In the CS6 reference it states:

Scripting plug-ins

The CS6 JavaScript scripting interface allows for limited scripting for plug-ins. A plug-in can define a command, with an event and notifier, and a handler that performs some action. A JavaScript script can then use the app.sendScriptMessage() method to send parameters to that plug-in-defined command, and receive a plug-in-defined response.

For example, the Adobe Custom Workspace plug-in defines a command "Switch Workspace". A script can invoke this command with the following code:

result = app.sendScriptMessage("Adobe Custom Workspace" , "Switch Workspace", '<workspace="Essentials" >');

In this case, the value that the plug-in returns is the string "<error=errNo>".

Does anybody know where or how I can find out the native plug-in commands and what parameters they accept?

Thank you for any ideas!

TOPICS
Scripting

Views

3.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
May 14, 2012 May 14, 2012

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 29, 2012 May 29, 2012

Copy link to clipboard

Copied

Now I think I got the first parameter list(from menu "Help > System Info"):

  • Live Menu Item
  • Adobe AI Application Plugin
  • Control Groups
  • Color Conversion
  • Composite Fonts
  • ......
  • ......
  • Scripts Menu
  • ScriptingSupport
  • Print Plugin
  • Adobe Perspective Guides
  • Adobe Nudge
  • AdobeNavigator
  • Adobe Path Blends
  • AdobeLinkPalette
  • Kinsoku Dlg
  • KBSC Plugin
  • GradientMeshPlugin
  • Flattening Preview
  • FileClipboardPreference
  • DocInfo
  • Character and Paragraph Styles
  • AI Bottlenecks Plugin
  • Asset Management
  • AdobeArtboardPanel
  • Adobe Art Style Plugin
  • AppBarControls
  • Alternate Glyph Palette
  • AdobeAlignObjects
  • 3D v2
  • PDF File Format

But, still don't know how to play with.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 17, 2013 May 17, 2013

Copy link to clipboard

Copied

Hello,

This example of the workspaceis an reference implmentation for 3rd Party plugin developers. 3rd Party plugin developers can Extend illustrator's scripting capabilities in a limited way by handling the plugin message "AI Script Message Caller" in their plugin.

e.g.

app. sendScriptMessage("my test plugin", "selector 1", "<param1=10, param2=20>");

will send a message with caller "AI Script Message Caller" and selector "selector 1" as the plugin message to plugin, whose name is "my test plugin". the message contains the data string passed in the 3rd parameter.

This will allow the 3rd Party plugin developers to handle these scripting messages and do what ever they would like to do based on this call.

As for original question, Illustrator's native pugins mainly exposes its APIs via native scripting APIs and does not depend on this extension mechanism. Since 3rd Party devleopers does not have access to Ai's Scripting DOM, this extension mechanism was added to provide them with some capability to extend Ai's scripting. For AI CS6, the complete guide for native APIs can be found at http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/illustrator/scripting/cs6/I...

Hope this helps.

Sanjay.

Engineering Manager

Adobe Illustrator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 17, 2013 May 17, 2013

Copy link to clipboard

Copied

Well thanks for the elucidation!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 14, 2015 May 14, 2015

Copy link to clipboard

Copied

Sorry, but in retrospect, your answer only comes a short way from my quoted documentation, and the scripting guide pdf linked in the answer only contains that little bit of quoted documentation. I think everyone would be truly interested in a list of parameters for the native plugins, to get a true handle on Illustrator's UI functionality. One big one, for example, is being able to delete an action set from the Actions palette.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 15, 2015 May 15, 2015

Copy link to clipboard

Copied

LATEST

Since Qwertyfly...‌ has discovered how to unload actions via calling unloadAction("set name", ""), this is no longer an issue!

However, there's all the rest of plugins we would like to be able to access, such as appearance style!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines