05-10-2013, 12:51 PM
Hello, i manage the IT department for a company and we have been toying with using macros to automate part of an existing system. The tests have show that it does work but unfortunately i dont have much knowledge when it comes to writing macros to be able to write it a well rounded more stable way.
Let me set the scene:
A window called "dispatch console" is open with the curser ready in the text input box.
Theres a scanner linked up to machine, when a barcode is scanned (from a packing invoice) the text is input into the field and then if the order number exists it then pops up another screen which is when the main "function" macro kicks in.
the function macro as i have written it clicks the print button then "wait 6" the click into when it says "freight" up on the dpad twice then clicks save "waits 2" then closes ready for the next order.
the main problem i am having is that A) im not an advanced user B) this is an internet based program so if the internet goes slow for a moment it can increase the time it takes for the buttons to become active and if the macro wait time is less than it actually takes then it will just stop, i know i can increase the time but it doesnt happen all the time and in honesty to slow it down for this will drastically affect the printing time for the 99% orders when the internet is fine. I Understand you can have the macro triggered when buttons become active but i dont have the skills or time to gain the skills so im hoping some one could help me.
Here's the macros i have currently written (main is the function, the others are refresh/ error correction)
We would possibly be able to pay for advanced onsite help
Function Macro
Refresh/ Clear Errors
Restart Dispatch Console Once Button Becomes Active
would any one be willing to help me develop this please
Let me set the scene:
A window called "dispatch console" is open with the curser ready in the text input box.
Theres a scanner linked up to machine, when a barcode is scanned (from a packing invoice) the text is input into the field and then if the order number exists it then pops up another screen which is when the main "function" macro kicks in.
the function macro as i have written it clicks the print button then "wait 6" the click into when it says "freight" up on the dpad twice then clicks save "waits 2" then closes ready for the next order.
the main problem i am having is that A) im not an advanced user B) this is an internet based program so if the internet goes slow for a moment it can increase the time it takes for the buttons to become active and if the macro wait time is less than it actually takes then it will just stop, i know i can increase the time but it doesnt happen all the time and in honesty to slow it down for this will drastically affect the printing time for the 99% orders when the internet is fine. I Understand you can have the macro triggered when buttons become active but i dont have the skills or time to gain the skills so im hoping some one could help me.
Here's the macros i have currently written (main is the function, the others are refresh/ error correction)
We would possibly be able to pay for advanced onsite help
Function Macro
int hwnd=val(_command)
int w1=act(win("Process Order" "WindowsForms10.Window.8.app.0.2780b98"))
lef 522 10 w1 1 ;; 'RadControl', push button
wait 5
lef 276 209 w1 1 ;;editable text
'UU ;; UP UP
lef 704 17 w1 1 ;; 'RadControl', push button
wait 2
lef 790 16 w1 1 ;; 'RadControl', push button
Refresh/ Clear Errors
int hwnd=val(_command)
int w1=act(win("Not found" "#32770"))
wait 0.2
lef 461 5 w1 ;;push button 'Close'
int w2=act(win("Dispatch Console" "WindowsForms10.Window.8.app.0.2780b98"))
lef 595 10 w2 ;;push button 'Close'
shutdown -7
Restart Dispatch Console Once Button Becomes Active
int hwnd=val(_command)
int w1=act(win("LinnWorks - Order Management - Release 4 - 4.1.1.1 - 380" "WindowsForms10.Window.8.app.0.2780b98"))
lef 1456 201 w1 1 ;; 'RadControl'
int w2=wait(5 win("Dispatch Console" "WindowsForms10.Window.8.app.0.2780b98"))
lef 224 54 w2 1 ;;editable text
shutdown -7
would any one be willing to help me develop this please