I've used the following code to accomplish this on my dev PC, and it works both uncompiled and compliled, but can't get it to work on the production pc from the compiled code.
It hangs at the point where I try to send the "tag" variable (assigned as a command line parameter). I run this from the command line as "C:\Macros\troubleticket.exe /tag=120" and here is the code:
Code: Select all
//Check value of tag variable
If>tag>0,Complete,Error
Label>Complete
//Keep the following message on screen until the script finishes.
let>msg_stayontop=1
let>msg_height=300
let>msg_width=500
let>msg_xpos=0
let>msg_ypos=0
Message>PLEASE DON'T TOUCH YOUR SCREEN UNTIL THIS MESSAGE DISAPPEARS.
//Open IE and go to web page
ExecuteFile>http://www.webpage.com
WaitWindowOpen>webpage: Logon*
Wait>1
MoveWindow>webpage: Logon*,0,0
ResizeWindow>webpage: Logon*,796,565
//login to webpage
Send>bcmgen
press tab
wait>.5
Send>fishy
wait>.5
press tab
wait>.2
press enter
//Enter and submit a new work order
WaitWindowOpen>webpage: Work Orders*
wait>.1
mousemoverel>345,353
wait>.1
lclick
wait>1
send>tag
wait>.1
press tab
WaitRectChanged>628,344,636,357,0
wait>.2
mousemoverel>490,377
lclick
//proceed to Logout
WaitWindowOpen>webpage: WO Confirmation*
mousemoverel>50,491
lclick
waitwindowopen>webpage: Logon*
closewindow>webpage: Logon*
WaitWindowClosed>webpage: Logon*
wait>.2
//Close Message box
CloseWindow>Macro Scheduler Message
Goto>End
Label>Error
MessageModal>NEED TAG NUMBER OF THE MACHINE, PLEASE CLICK OK AND TRY AGAIN.
Label>End
//end of script
Thanks, Knobb490