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.
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.
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!
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:
From Extendscript the following code will call a plugin to perform a task:
- 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.