Can you currently print to one printer?Hello, how can I print on several printers at the same time?
yes of courseCan you currently print to one printer?
Then do that repeatedly?yes of course
I print a receipt which is linked by a USB cable the other linked by a network cable which is in another location example kitchenYou're going to need to give a lot more context to this request before anyone has a hope of helping.
This doesn't make sense to me. I don't understand how you can have a receipt "linked by a USB cable". Maybe use more than one sentence.I print a receipt which is linked by a USB cable the other linked by a network cable which is in another location example kitchen
all simply I want to print duplicate on 2 different printers at the same timeThis doesn't make sense to me. I don't understand how you can have a receipt "linked by a USB cable". Maybe use more than one sentence.
procedure printReceipt:
define input parameter printerName as character no-undo.
define input parameter receiptBody as character no-undo.
output through value( "lp -d" + printerName ). /* yes, I have used UNIX style syntax here. replace it with something more windows like */
put unformatted receiptBody skip.
output close.
end.
define variable rcpt as character no-undo.
rcpt = "my reciept".
run printReceipt( "printer1", rcpt ).
run printReceipt( "printer2", rcpt ).
I couldn't find the command under WindowsThere is nothing built-in to the language that will simultaneously send the same output to two destinations. Frankly I would be surprised if any language has such a feature built in. The closest thing that springs to mind is the UNIX "tee" command.
Working within the 4gl I would simply encapsulate the functionality and then call it twice. Once for each printer.
Something like:
Code:procedure printReceipt: define input parameter printerName as character no-undo. define input parameter receiptBody as character no-undo. output through value( "lp -d" + printerName ). /* yes, I have used UNIX style syntax here. replace it with something more windows like */ put unformatted receiptBody skip. output close. end. define variable rcpt as character no-undo. rcpt = "my reciept". run printReceipt( "printer1", rcpt ). run printReceipt( "printer2", rcpt ).