My problem is right towards the end of the script where i click a button to cancel the order which is currently open. A popup dialog box is presented once i do this (verifying that i wish to cancel the order). As soon as this popup box arrives, the macro no longer continues, the popup doesn't accept the macro commands and only user interaction clears it. Once cleared the macro continues to run.
The popup forces focus even if you attempt clicking out of the box, so it shouldn't be a focus issue (i've tried setting focus all the same, you should see it commented out in the below code)
This issue seems very similar to the one found at this thread
http://www.mjtnet.com/usergroup/viewtop ... n&start=15
but i'm unable to figure out a workaround in my particular instance
At this stage i'm that new to MacroScheduler that it could be a very basic problem, so apologies if it should be an easily found answer, but it has had me scratching my head for quite some time now.
Any help or pointers would be greatly appreciated.
script code below
Code: Select all
// Generated by MacroScript WebRecorder 2.01
// Recorded on Saturday, April 5, 2008, at 10:39 PM
//Move the mouse cursor out of harm's way to avoid causing mouseover events to interrupt
MouseMove>0,0
Let>delay=2
IE_Create>0,IE[0]
IE_Navigate>%IE[0]%,https://********,r
Wait>delay
GetActiveWindow>window_title
If>{(%window_title% = "Utility Key")}
Send Character/Text>****
Press Enter
Endif
IE_Wait>%IE[0]%,r
Wait>delay
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"Order Now"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue,r
IE_Wait>%IE[0]%,r
Wait>delay
Let>k=1
ReadLn>c:\data.csv,k,line
If>line=##EOF##,finish
Label>start
Let>FrameName={""}
Let>FormName={"form"}
Let>FieldName={"ITPInputText_existingOrder"}
Let>FieldValue={"0%line%"}
Let>k=k+1
IE_FormFill>%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r
Wait>delay
Let>FrameName={""}
Let>FormName={"form"}
Let>TagValue={"buttonNext"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue,r
IE_Wait>%IE[0]%,r
Wait>delay
Wait>delay
Let>FrameName={""}
Let>FormName={"form"}
Let>TagValue={"buttonNext"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue,r
IE_Wait>%IE[0]%,r
Wait>delay
Wait>delay
Let>FrameName={""}
Let>FormName={"form"}
Let>TagValue={"https://***************/cancel.gif"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,INPUT,SRC,str:TagValue,r
Press Enter
//Below is where i've tested SetFocus
//WaitWindowOpen>Windows Internet Explorer
//SetFocus>Windows Internet Explorer
//Wait>1
//Press Enter
//Goto>start
Label>end_script