May 30, 200619 yr I have a script that loops through 1500 records and prints an associated pdf. I find that now it has missed printing some of these pdfs. Some are 50 pages long and may take 7 or 8 seconds to send to the printer. But others are only a few pages long and still are not printing. I ran some tests on a batch of 100 and of course they all printed fine. So I wonder if there is a way to find out when a pdf has been printed and then go to the next record without an arbitrary pause. LoopScript.pdf
May 31, 200619 yr This is more than likely a timing issue. The most robust solution would be to use OS level scripting to monitor the printer and only move on in the loop when the printer is not spooling or is done printing. Or, less robust but entirely inside FM, use a counter in the loop and add an extra long pause every x iterations (x being whatever you think is safe).
May 31, 200619 yr Author Thanks Wim: When you talk of OS level scripting do you mean the Comand Line on Windows (this is being run on a Windows system) or VB Script. I am not that familiar with automation tools on Windows. Could you point me towards some learning resources for those topics?
May 31, 200619 yr Both. Command line for simple stuff, VBscript (or Jscript) for more complex things. This is a good place to start: http://www.microsoft.com/scripting
Create an account or sign in to comment