Adobe InDesign CS3 Scripting Guide VBScript
This document shows how to do the following:
.Work with the Adobe® InDesign® scripting environment.
.Use advanced scripting features.
.Perform basic document tasks like setting up master spreads, printing, and exporting.
.Work with text and type in an InDesign document, including finding and changing text.
.Create dialog boxes and other user-interface items.
.Customize and add menus and create menu actions.
.Respond to user-interface events.
.Work with XML, from creating XML elements and importing XML to adding XML elements to a layout.
.Apply XML rules, a new scripting feature that makes working with XML in InDesign faster and easier.
We assume you already read Adobe InDesign CS3 Scripting Tutorial and know how to create, install, and run scripts.
…
Getting the Current Script
You can get a reference to the current script using the ActiveScript property of the application object. You can use this property to help you locate files and folders relative to the script, as shown in the following example (from the ActiveScript tutorial script):
Set myInDesign = CreateObject(”InDesign.Application.CS3″)
myActiveScript = myInDesign.ActiveScript
MsgBox (”The current script is: ” & myActiveScript)
Set myFileSystemObject = CreateObject(”Scripting.FileSystemObject”)
myParentFolder = myFileSystemObject.GetFile(myActiveScript).ParentFolder
MsgBox (”The folder containing the active script is: ” & myParentFolder)
When you debug scripts using a script editor, the ActiveScript property returns an error. Only scripts run from the Scripts palette appear in the ActiveScript property.
…
Using the DoScript Method
The DoScript method gives a script a way to execute another script. The script can be a string of valid scripting code or a file on disk. The script can be in the same scripting language as the current script or another scripting language. The available languages vary by platform: on Mac OS®, you can run AppleScript or JavaScript; on Windows®, VBScript or JavaScript.
…
Website: www.adobe.com | Filesize: 3310kb
No of Page(s): 155
Click here to download Adobe InDesign CS3 Scripting Guide VBScript.
Related Tutorial
Tags: Adobe InDesign, scripting guide, tutorial scripting, vbscript
Comments
Leave a Reply