Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Break Out of Running Script in Framemaker

Contributor ,
Dec 12, 2022 Dec 12, 2022

I'm at the point where I'm about to launch my script on some unsuspecting editors. I've done as much testing as I can, but it's likely someone will run the script in a manner that wasn't intended.  Also, being somewhat of a novice, I'm sure I overlooked a necessary error trap or two.  Our editors don't have the ExtendScript Toolkit, so no way to stop a runaway script from there.  I've searched the web and this forum for any information on how to terminate (or exit) a running script from inside Framemaker.  Appreciate any suggestions. 

317
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 12, 2022 Dec 12, 2022

The only way I know how to do it is to just force quit FrameMaker. Of course, the best way is to make sure your code is robust enough to prevent runaways. The most likely cause are endless loop situations, but those usually show up in testing. For scripts that work on active documents and books, I will have my client test them on several documents before turning them loose on a book. Also, I never let a script save a document that it did not open, so I may tell the client to open all files in th

...
Translate
Community Expert ,
Dec 12, 2022 Dec 12, 2022

The only way I know how to do it is to just force quit FrameMaker. Of course, the best way is to make sure your code is robust enough to prevent runaways. The most likely cause are endless loop situations, but those usually show up in testing. For scripts that work on active documents and books, I will have my client test them on several documents before turning them loose on a book. Also, I never let a script save a document that it did not open, so I may tell the client to open all files in the book before running it on the book. That way, they can close the files without saving them. Of course, when in doubt, have backups done before running on production documents just in case.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Dec 13, 2022 Dec 13, 2022

Thanks Rick...I'm disappointed there isn't a way to exit a running script within Framemaker.  I can see where novice script developers will have problems in future when the customer will longer be able to use Extendscript; especially when you disable screen updating to speed up execution.   I appreciate all your tips...especially the one about not letting a script save a document it didn't open.  I'll incorporate that immediately.  Answer marked as correct.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 14, 2022 Dec 14, 2022
LATEST

We're no longer "unsuspecting," Gator... 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines