> > Typically, when a script won't quit running, there is some continual loop > going on. This is one of the reasons for saving documents before running a > script. More importantly, you need to find out the source of the never-ending > loop. > I have put messageBox() into a loop that feeds back one or more variables to > understand what's happening. You can also put in a valueDialog() where you > give permission for the script to continue with one value and with another > leads to a sys.exit. > You could also create a counter of some sort that counts the number of > recursions of a loop, then exits with some excessive value. > > Greg > >
Yes, thank you Greg. What I was sharing, was not about a script that "won't quit running", it was about a well tested and established script doing a very big job. Of course we are saving the document before we run the script. This is the Scribus generator, first creating hundreds of .sla files and then rendering those as hundreds of PDF files and then deleting the temporary .sla files. There are just rare occasions where all is well, but I still need to kill the script from the outside (for example a power cut and low battery), that is why I wrote +1 for the proposed feature of a global kill-button. Also you are confirming - indirectly - that presently there is nothing provided to kill a faulty or not-mature script in Scribus. So what about debugging when writing a new script? Or imagine that I have maybe ten scripts (not all written by me) and run them on different documents at different times. Every so often I get new versions of those scripts togehter with new versions of Scribus. Rather than hack all my scripts to include potential stopping, if needed, a global Scribus-level feature that can kill any script would be - to me - more efficient. hope the situation is now clearer, greetings, Martin ___ Scribus Mailing List: scribus@lists.scribus.net Edit your options or unsubscribe: http://lists.scribus.net/mailman/listinfo/scribus See also: http://wiki.scribus.net http://forums.scribus.net