6 Replies Latest reply on May 15, 2015 8:28 AM by Silly-V


    Silly-V Adobe Community Professional

      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!

        • 2. Re: sendScriptMessage
          moluapple Level 4

          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.

          • 3. Re: sendScriptMessage
            sanjaykr Adobe Employee



            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.



            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/scrip ting/cs6/Illustrator-Scripting-Guide.pdf


            Hope this helps.



            Engineering Manager

            Adobe Illustrator

            • 4. Re: sendScriptMessage
              Silly-V Adobe Community Professional

              Well thanks for the elucidation!

              • 5. Re: sendScriptMessage
                Silly-V Adobe Community Professional

                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.

                • 6. Re: sendScriptMessage
                  Silly-V Adobe Community Professional

                  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!