Scripting language support in Adobe Illustrator CC¶
Script file extensions¶
For a file to be recognized by Adobe Illustrator CC 2017 as a valid script file, the file must have the correct file name extension:
|Script Type||File type (extension)||Platforms|
|AppleScript||compiled script ( .scpt ) OSAS file (no extension)||Mac OS|
|VBScript||text ( .vbs )||Windows|
Extensions are Flash-based (SWF) and can potentially work in a variety of Creative Cloud applications.
Developing a CC extension using ActionScript¶
Creative Cloud applications have an extensibility infrastructure that allows developers to extend the capabilities of the applications; the infrastructure is based on Flash/Flex technology, and each extension is delivered as compiled Flash (SWF) file.
Creative Cloud includes the Extension Manager to enable installation of extensions.
An example of an extension that ships with the point products is Adobe Kuler. Kuler has a consistent user interface across the different suite applications, but has different logic in each, adapted to the host application.
The user interface for an extension is written in ActionScript, using the Flex framework. An extension is typically accessed through its own menu item in the application’s Extensions menu.
Adobe Extension Builder allows you to design the user interface interactively using the Design view of Flash Builder. The Creative Cloud SDK also allows you to develop all of the application logic for your extension in ActionScript; you can develop and debug your extension in the familiar Flash Builder environment.
To develop your application logic, we recommend using the ActionScript Wrapper Library ( CSAWLib ), which exposes the scripting DOM of each host application as an ActionScript library. This is tightly integrated with the Adobe Extension Builder environment, which includes wizards to help you build your extension’s basic structure, and run and debug your code against suite applications such as Adobe InDesign, Photoshop and Illustrator.
For details of how to use Adobe Extension Builder and the wrapper libraries, see the Creative Cloud SDK documentation, which is accessible from within Adobe Extension Builder.
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
ExtendScript also provides various tools and utilities, including the following:
- A localization utility
- Tools that allow you to combine scripts and direct them to particular applications
- Platform-independent file and folder representation
- Tools for building user interfaces to your scripts
- A messaging framework that allows you to send and receive scripts and data among scripting-enabled Adobe applications