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

ScriptingSupport client does not return an error if the supplied script does not exist

Contributor ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

I found this little gotcha when converting plugins from 20-17 to 2019 for a client. The call to the ScriptingSupport client does not return any error indication if the script file does not exist. This took longer than it should have to resolve. If the call had returned an error, say FE_NameNotFound, the problem would have been immediately obvious. I have created a bug, which you may care to vote for, which includes code to illustrate the problem.

https://tracker.adobe.com/#/view/FRMAKER-9298

 

This is the output written to the console for the test code. The second script does not exist and ScriptingSupport returns no indication of this. Note that FA_errorno will only have non zero values if F_ApiCallClient itself has problem. It is up to ScriptingSupport (FrameMakerScriptingSupport.dll) to return other than zero if a problem occurs, or the return value from the script, if one is provided.

adobetestscript1.jsx returned 100

FA_errorno = 0

adobetestscript2.jsx returned 0

FA_errorno = 0

TOPICS
Scripting

Views

144

Translate

Translate

Report

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
Community Beginner ,
Oct 06, 2020 Oct 06, 2020

Copy link to clipboard

Copied

It may not help in this situation, but you can use notifications and ReturnValue on the extendscript side to communicate between extendscript and your FDK client.

 

Its a bit more setup, but gives much more control than just saying "run this script if it exists".

Votes

Translate

Translate

Report

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 ,
Oct 06, 2020 Oct 06, 2020

Copy link to clipboard

Copied

LATEST

Thanks Dan,

 

I am already return values in extendscripts. I cannot envisage, in a commercial environment at least, where you wouldn't want to know if the script succeeded or had an error. This is the annoying thing about this bug; having the scripting support client returning 0, usually means everything was okay. 

I use notifications from Extendscripts to access plugin functions.


As you surmised, returning values or notifications do not help in this case, as the script is never processed.

 

Jon

 

 

Votes

Translate

Translate

Report

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