Launching and quitting Illustrator from a script¶
Your scripts can control the activation and termination of Illustrator.
Launching and activating Illustrator¶
In AppleScript, you use a tell statement to target Illustrator.
The activate command activates Illustrator if it is not already active
tell application "Adobe Illustrator" activate end tell
In VBScript, there are several ways to create an instance of Illustrator:
CreateObjectlaunches Illustrator as an invisible application if it is not already running. If Illustrator is launched as an invisible application you must manually activate the application to make it visible:
Set appRef = CreateObject("Illustrator.Application")
If you have multiple versions of Illustrator installed on the same machine and use the CreateObject method to obtain an application reference, using “Illustrator.Application” creates a reference to the latest Illustrator version. To specifically target an earlier version, use a version identifier at the end of the string:
|Illustrator CC 2014||“Illustrator.Application.CC2014”|
|Illustrator CC 2015||“Illustrator.Application.CC2015”|
|Illustrator CC 2017||“Illustrator.Application.CC2017”|
- Use the
Newoperator if you added a reference to the Illustrator type library to the project. For example, the following line creates a new reference to the Application object:
Set appRef = New Illustrator.Application