Progress Bar for FrameMaker / ExtendScript

Adobe Community Professional ,
Jun 25, 2020

Copy link to clipboard

Copied

Hi All,

 

I have tried to use ScriptUI to make progress bars for my scripts, but they are not very useful because of "(Not responding)" in the title bar for long operations. Any other options for reliable progress bars for scripts? Thank you very much.

 

-Rick

Views

76

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Explorer ,
Jun 26, 2020

Copy link to clipboard

Copied

Hi Rick,

 

Trust you are keeping safe in the challenging environment at the moment?

 

If you are launching the ExtendScript from a plugin, you could always start it in a separate thread. I have created a separate thread in the past to work around a problem with PDF creation.

 

For my customer who has a number of long running processes and where it was not uncommon for a user to kill FrameMaker because they believed it had hung, I created a progress bar in a C# DLL with a managed to unmanaged separate C++ DLL, that could then be called from a C++ plugin. This works well.

 

AFAIK it is not possible to multi-thread in Javascript.

 

It would be nice if Adobe made the user interface multi-threaded and lauched ExtendScripts in their own thread. The UI is better in 2019, but still stops updating with long processes or scripts.

 

Also be nice if FrameMaker support C# directly!

 

Jon

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jun 26, 2020

Copy link to clipboard

Copied

Hi Jon, Thank you for your reply. Please let me know if you would consider making your plugin available. According to the "JavaScript Tools Guide," there is a way to integrate C++ code with ExtendScript (Chapter 7). If your progress bar could be called from ExtendScript, I would definitely be interested. I have budget for this as well. Thank you very much. -Rick

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
JonEBe LATEST
Explorer ,
Jun 29, 2020

Copy link to clipboard

Copied

Hi Rick,

 

The C# DLL with a managed to unmanaged separate C++ DLL is highly customised to suit the customer. That said it would not take much to make it generic.

 

From c++ the following API call will run an Extendscript:

F_ApiCallClient("ScriptingSupport", "PathToScriptFile");

 

From Extendscript the following code will call a plugin to perform a task:

CallClient("PluginName", "SomeActionToTake");

- this requires registration for the notify event FA_Note_ClientCall and subsequent processing of the event.

There is limited scope to pass parameters (a string only) and only an integer can be returned. For error handling I have the processing end save the error to a file and the requesting end then handles it.

 

I would be interested to see if starting F_ApiCallClient to run an Extendscript, when launched in a separate thread, allows the Extendscript to update a progress dialog while running.

 

If you would like to discuss the C# DLL progress bar further please private message me with contact details.

 

Jon

Likes

Translate

Translate

Report

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