Printing a series of numbers

Jérôme Rosat jrosat at mac.com
Sun Sep 13 16:44:37 EDT 2009


Thanks Sparkout,

The two solutions which you propose are relevant. I'm going to make a  
"proof of concept" with the first solution and explore the second one.

Thank you very much for the link about WMI. I did not know WMI.

Jérôme

Le 12 sept. 2009 à 23:49, SparkOut a écrit :

>
>
> Jérôme Rosat wrote:
>>
>> Thanks Craig and JB.
>>
>> My problem is not to reload the tray but to stop printing the number
>> (and stop increasing numbers) when the tray is empty.
>>
>> I was probably not clear. Sorry for that but english is not my native
>> tongue. In my company we receive approximately 300' 000 mails  
>> during a
>> year.  Currently we number each mail with a label preprinted with a
>> number. And we stick the labels to the hand. So, what I want it is to
>> put all mails received during the day in the tray of the printer and
>> print a number on each mail and when the tray is empty, I need to
>> store the last number in my stack and use this number the following
>> day to start again to number mails.
>>
>> Jérôme
>>
> Ah, I think I get it. You want to print a variable number of serial  
> numbers
> on the documents received, which you have placed in the paper tray  
> of your
> printer. The first serial number should be yesterday's last serial  
> number
> plus 1. So yesterday's range might have been from 19273 to 19411 and  
> today
> should start at 19412 and go through until the documents are out  
> (say there
> were 100, then tomorrow's first document will be numbered 19512).
>
> Easy (ish) way:
> 1) Stack your documents in the paper tray and print 1000 serial  
> numbers onto
> them starting from (say, as above) 19412.
> 2) In the morning, look at the output from the printer and determine  
> that
> the print run ran out at 19511.
> 3) Cancel the outstanding print queue
> 4) Set rev to store 19512 as the new start serial number of the  
> print run.
> 5) Collect up today's documents and put them in the print tray.
> 6) Print 1000 serial numbers onto the documents, starting at the  
> figure
> recorded in step 4.
> 7) Go home
> 8) In the morning look at the output from the printer and determine  
> that the
> print run ran out at 19643.
> 9) Cancel the outstanding print queue.
> 10) Set rev to store 19644 as the new start serial number of the  
> print run.
> 11) onwards, repeating the appropriate steps as necessary.
>
> More technical way - possibly/probably printer/platform dependent:
> Find out what SNMP/html/scripting methods there are for  
> interrogating the
> print queues.
> Some printers have an interface for reporting status, and some OS  
> scripting
> can be employed. I can't give you any pointers about SNMP at all. It  
> may be
> worth checking if you could get any information from the given  
> printer by
> checking in a web browser. If you can, then you could probably use  
> rev to
> get the url of the printer status page, and parse the data returned to
> extract information about the paper situation. If you did this in a  
> repeat
> loop before sending your next serial number print job you could get  
> rev to
> tell whether it is safe to print the next number or wait for your  
> return to
> stack the new lot of documents in the paper tray. If the last print  
> job was
> reported OK and the printer status says paper is not out, then add 1  
> to the
> serial number and print, else exit the repeat loop.
> If on Windows, you could use WMI scripting by getting rev to "do" a  
> vbscript
> with WMI interrogation of the printer status to verify that the last  
> print
> job did not fail and the status is ready and similarly you could put  
> that
> script in the loop and depending on result returned from the WMI
> interrogation, either advance the count and print again or exit the  
> loop and
> wait for you to start again with new documents the next day.
> If on Mac, I imagine there may be something vaguely similar in  
> Applescript,
> or Linux maybe some shell scripting, but I have no idea.
> On Windows, there is some vbscript which you can look at, which  
> shows some
> WMI interrogation on printing (as well as lots of other stuff) here:
> http://www.microsoft.com/technet/scriptcenter/guide/sas_prn_overview.mspx?mfr=true
>
> I don't know if any of that is useful, but hope it helps.
> S/O
> -- 
> View this message in context: http://www.nabble.com/Printing-a-series-of-numbers-tp25351555p25418521.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list