13
ExtendScript Getting Started Willam van Weelden

Getting Started with ExtendScript for RoboHelp - part 1/2

Embed Size (px)

Citation preview

Page 1: Getting Started with ExtendScript for RoboHelp - part 1/2

ExtendScriptGetting Started

Willam van Weelden

Page 2: Getting Started with ExtendScript for RoboHelp - part 1/2

ExtendScript:

• Adobe language for automating Adobe products

• Supported in:• RoboHelp

• FrameMaker

• PhotoShop

• Many more

Page 3: Getting Started with ExtendScript for RoboHelp - part 1/2

ExtendScript:

• Is based on JavaScript syntax

• Supports common JavaScript methods

• Custom API for different Adobe products

• Generic additions• File/Folder manipulation

• GUI

• XML

Page 4: Getting Started with ExtendScript for RoboHelp - part 1/2

ExtendScript:

• Object Oriented, like JavaScript. But not much more.

• Isn’t like JavaScript in the Browser• ‘.count’ instead of ‘.length’. And it starts at 1

• No DOM• no: getElementById

• Gotcha’s when running scripts automated in RoboHelp

Page 5: Getting Started with ExtendScript for RoboHelp - part 1/2

What you will need:

• ExtendScript Toolkit (included with RoboHelp)

• Adobe RoboHelp

• RoboHelp Scripting Guide• Overview of variables and constants also available in ExtendScript

Toolkit

• Editor with JavaScript Syntax Highlighting• Optional. I prefer Notepad++ over the ExtendScript Toolkit

Page 6: Getting Started with ExtendScript for RoboHelp - part 1/2

RoboHelp API

Page 7: Getting Started with ExtendScript for RoboHelp - part 1/2

RoboHelp API: Constants

Page 8: Getting Started with ExtendScript for RoboHelp - part 1/2

RoboHelp API: Accessing Topics

Page 9: Getting Started with ExtendScript for RoboHelp - part 1/2

Demo 1:

• Loop through all topics in the project

• Put list of topics to Output View Pod

• Write list of all topics to text file

Page 10: Getting Started with ExtendScript for RoboHelp - part 1/2

Demo 2:

• Loop through all topics and snippets in the project

• Open topics and snippets and search for <span> with inline styling

• Remove inline styling and save topics

Page 11: Getting Started with ExtendScript for RoboHelp - part 1/2

Make it easy!

• Willam’s RoboHelp ExtendScript Library

• Full Documentation

• Shortcuts for many common features• Removing / Finding tokens• Getting SSL settings• Get and assign map id and map # for Context Senstive Help• Support for linked documents• And much more!

• 100% Free!

Page 12: Getting Started with ExtendScript for RoboHelp - part 1/2

Sample: Get Token by Tag Name

Page 13: Getting Started with ExtendScript for RoboHelp - part 1/2

ExtendScriptQuestions?