-
1. Re: [JS][CS5] Processing files in the background
John Hawkinson Oct 29, 2011 6:42 AM (in response to Roy Marshall)Yeah, this doesn't sound like a good architecture.
Your use of the word "process" suggests you may not have a lot of familarity with the way your operating system (which one?) handles multiple simultaneous programs. You might want to read up on that.
i would create a sepeate Process (entirely unrelated to InDesign) that did the database querying and could communicate to the InDesign script via a mechanism that's very small and quick (such as the existence of a "flag" file to indicate there was work to do),.
Then, you can add your script as an Idle event handler (in CS5 and later, only, unless you have and are ok with depending on APID Toolkit), and every time it gets an idle event, check to see if the flag file (or whatever) exists.
No idea why your script stops on its own accord. You should:
1. Break your script down to the smallest possible case that reproduces the failure
2. Wrap it in try/catch and report errors via alert() or $.writeln(). Some persistent scripts seem to escape from the normal error handling conditions (not sure if thisis a bug)
3. Post your minimal version of the script.
-
2. Re: [JS][CS5] Processing files in the background
Roy Marshall Oct 29, 2011 2:14 PM (in response to John Hawkinson)Hi John.
Thanks for the reply. It turns out that when I active the script using a Configurator plugin, it times out after 5 mins. Running from the scripts panel doesn't time out.
I will look at the suggestions around the process, as it does bug me InDesign is using all the system resourses while effectivly doing nothing.
Thanks again
Roy



