Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Audit if a print has been sent to the printer
#1
Hello all, let me just explain the issue im having.

We have warehouse pcs with a piece of software called linnworks on and a scanner connected.
1) the warehouse scan a barcode, the macro completes some tasks to replicate a users interactions (prints a label).
2) when the print label happens on linnworks it creates a csv file and places into a folder on our network.
3) a piece of software picks the file up and imports it into the courier shipping software at which point a postcode look up is automatically run, if all is correct the software sends a label to the printer if there is an issue i.e. wrong address the courier software wont produce a label but the macro has still completed a full circle of its commands meaning its ready to scan the next.

here is a copy of the basic macro
Code:
Copy      Help
int hwnd=val(_command)
int w1=act(win("Process Order" "WindowsForms10.Window.8.app.0.2780b98"))
lef 1001 205
lef 590 238
int w=win("Process Order" "WindowsForms10.Window.8.app.0.2780b98")
wait 0 S "Scanner_Macro (16).bmp" child("" "*.Window.*" w 0x0 "wfName=bubbleBar5") 0 16 ;; 'RadControl'
if(scan("Scanner_Macro111.bmp" 0 0 1|16))
    int w2=act(win("Process Order" "WindowsForms10.Window.8.app.0.2780b98"))
    lef 1205 201
    wait 2
    int w3=act(win("Process Order" "WindowsForms10.Window.8.app.0.2780b98"))
    lef 1256 205
else if(scan("Scanner_Macro (15).bmp" 0 0 1))
    int w5=act(win("Process Order" "WindowsForms10.Window.8.app.0.2780b98"))
    lef 1205 201
    wait 2
    int w4=act(win("Process Order" "WindowsForms10.Window.8.app.0.2780b98"))
    lef 1256 205
    Speak "Ready To Scan"
shutdown -7

is there any way quick macros could look to see if there was a print and if there was play some text to speach instruction?
#2
oh and the printer which prints the label is connected to the same pc that the user is scanning on
#3
Quote:to see if there was a print
How it can be detected? What are changes when there is a new print? A new file added, something changes in some window, etc?
#4
would it be possible to detect it when a print command is recieved onto a local printer and then printed (appears into the print que)
#5
It seems possible with Windows API function FindFirstPrinterChangeNotification and related functions. But need quite much programming, I did not test it.
Also can try to detect changes in the print job list window. For example, use accessible object functions.
Also can get the print job list with Windows API function EnumJobs.


Forum Jump:


Users browsing this thread: 1 Guest(s)