Adobe 65030089 Scripting Guide - Page 5
Scripting basics
UPC - 883919170626
View all Adobe 65030089 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 5 highlights
1 Chapter 1: Scripting basics A script is a series of commands that instructs Adobe® RoboHelp® to perform a set of specified actions, such as counting the images used in a RoboHelp project or selecting multiple master pages and importing them. Scripts automate repetitive tasks and are often used as a creative tool to streamline tasks that are time-consuming. Before you begin scripting, take a few moments to read an overview of the scripting support in RoboHelp and find out how to create and run scripts. If you are familiar with scripting or programming languages, you can skip this chapter and refer to "Classes" on page 4 and "Constants" on page 83 for information about RoboHelp scripting classes and constants. If you are new to scripting, you can acquaint yourself with the basic scripting concepts provided in the Introduction to Scripting manual. Scripting support in RoboHelp RoboHelp supports ExtendScript, which is an extended version of JavaScript. As a beginner, the difference between these two languages does not affect you. However, name JavaScript scripts with a .jsx extension, instead of the usual .js extension. ExtendScript files are distinguished by the .jsx extension. Creating scripts Adobe provides ExtendScript Toolkit (ESTK) with its applications as a scripting utility. The ESTK has many features that make it easier to use than a text editor, including a built-in syntax checker that identifies where the problems are in your script and tries to explain how to fix them, and the ability to run your scripts right from the ESTK without saving the file. This second feature can save you a lot of time, especially in the beginning when you may have to test and edit a script several times to get it to work. Debug scripts ❖ Select the Adobe RoboHelp 8 option as the target application from the drop-down list in the ESTK. Edit scripts ❖ Double-click a script file in Script Explorer or Windows Explorer to edit it using the ESTK. Managing scripts from within RoboHelp The Script Explorer pod enables you to manage scripts and do any of the following: Create a script folder Create a folder for storing specific scripts. For example, you can store scripts that record data in one folder and scripts that display output in another folder. Reorganize folders You can reorganize folders through simple drag-and-drop operations. Import and export You can export and import script files and folders in different projects and locations. To import or export a folder, it must contain at least one script file.