Upload
wvanweelden
View
115
Download
2
Embed Size (px)
Citation preview
ExtendScriptGetting Started Part 2
Willam van Weelden
Get the files
• http://robohelp.wvanweelden.eu/Getting started webinar.zip
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
RoboHelp API
RoboHelp API: Constants
RoboHelp API: Accessing Topics
Scripting Events
• Schedule script to run automatically
• Needs to be set for every RoboHelp Installation separately
Events 1/2Event Event occurs
closeTopic When a topic is closed
openTopic When a topic is opened
preImport Before a file is imported
postImport After a file is imported
postSSLGenerate
After an SSL is generatedNote: When you have an SSL with multiple content categories, this event is fired for every category.
preSSLGenerate
Before an SSL is generatedNote: When you have an SSL with multiple content categories, this event is fired for every category.
Events 2/2Event Event occurs
preWordDocUpdate Before a linked Word document is updated
postWordDocUpdate After a linked Word document is updated
preFrameMakerDocUpdateBefore a linked FrameMaker document is updated
postFrameMakerDocUpdateAfter a linked FrameMaker document is updated
SaveAll When the Save All button is clicked
postTopicUpdate After a topic is updated
preImportPDFComments Before importing PDF review comments
postImportPDFComments After importing PDF review comments
preCreateReviewPDF Before creating a PDF review document
postCreateReviewPDF After creating a PDF review document
openProject When a project is opened
preCloseProject Before a project is closed
postSOpenProject After a project is closed
Watch out!
• Only functions are available.
• Global variables unavailable.
• Object.prototype functions unavailable.
Deep Dive
• Schedule script to run automatically
• Get files from template directory
• Coyp files into the output
Plan
• Get the SSL whenever an output is created
• Check whether you want this SSL to be processed
• Get the SSL output directory
• Copy skin files over
Make it easy!
• Willam’s RoboHelp ExtendScript Library
• Full Documentation
• Compatible with scripting events. Even the global variables and custom methods.
• Shortcuts for many common features• Setting SSL settings• Get and assign map id and map # for Context Senstive Help• Support for linked documents• And much more!
• 100% Free!
Sample: Get Token by Tag Name
ExtendScriptQuestions?