Extendscript variables undefined when triggered from PostFrameMakerDocUpdate event
i trying run extendscript script in rh10.0.1.292.
this script registered postframemakerdocupdate event runs evey time update fm sources.
every time update or force update, when script runs, 'undefined variable' message.
however, when run same script within robohelp, or extendscript toolkit, fine. script runs completion without errors.
initially, undefined variable global (defined @ top of file before functions)
var rev = "rev 2.3 december 22, 2013";
if move rev function used, error: numparastyles undefined variable. local variable, defined in 1 , function ued.
var numparastyles = fm_paragraphstyles.length;
although fm_paragraphstyles global array:
var fm_paragraphstyles = ["tiptext", "cautiontext", "warningtext"];
this script is based on reference page image updater.jsx script included in
adobe\robohtml\10.00\scripts\sample scripts
folder. added rev string part of debugging efforts,
since script works find extendscript toolkit , within robohelp, suspect happening mess script's variable scoping when script run in response event. that's guess. not expert in javascript, let alone extendscript.
has else seen behavior? there can prevent error messages?
thanks!
extendscript doesn't work nice globals if using scripting
events. in experience, easiest workaround create functions
that create globals , call function in function linked
event. personally, make script , add
function events initiates globals ,
runs script normally. there's no easy fix, sorry.
i believe bug. can report bugs adobe via
https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
kind regards,
willam
More discussions in FrameMaker Integration
adobe
Comments
Post a Comment