Help with Halting Macro Execution

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Bearhunter
Newbie
Posts: 1
Joined: Tue Apr 20, 2010 7:31 pm

Help with Halting Macro Execution

Post by Bearhunter » Tue Apr 20, 2010 9:07 pm

Need some peer support!

I can't get my macro to halt execution once it starts. I have tried Shift-Esc, CTRL-F2 and some Onevent code but I don't have any success.

My code is below.

Thanks in advance.

Bearhunter

/////////////////////////////////

// H:\Data\Macro Scheduler 11\Scroll Sense.scp
// Recorded on Tuesday, April 20, 2010, at 07:32 AM
//Mousemove>600,600
//LClick
//Mousemove>5,5
//WaitWindowOpen>Merak Peep Version 4 - [Decline Test Two [Batch]]
//MoveWindow>Merak Peep Version 4 - [Decline Test Two [Batch]],-4,-4
//ResizeWindow>Merak Peep Version 4 - [Decline Test Two [Batch]],1288,1002
Wait>0.3
//Scroll sensitivity window to bottom
MouseMove>628,224
Wait>0.5
LDown
Wait>0.25
MouseMove>628,386
Wait>0.5
LUp
Wait>0.16
MouseMove>468,385
Wait>0.5
LClick
//Selected Last Sensitivity

Wait>0.5
//Move to first case under JMCCARTH
MouseMove>164,217
Wait>0.3
LClick
Wait>0.3
MouseMove>349,265
Wait>0.3
LClick
//Added first case to sense stack w Lclick above


MouseMove>397,397
LClick
Press up *2
MouseMove>346,262
LClick
//Set Position of Message Window
//MSG_XPOS>600
//MSG_YPOS>600

Let>x=1
Repeat>x

Wait>0.5
if>x=2
Message>x
Wait>0.5

Gosub>Event
Endif
Let>x=x+1
Press Tab * 3
Wait>0.3
Press Up
Wait>0.3
Press Up
Wait>0.1
MouseMove>346,262
LClick

Until>x=5
Message>Done
SRT>Quit
Message>About to exit
Exit>0
END>Quit

SRT>Event
Message>Press ESC after message disappears
Wait>1
Wait>3
//Press Esc to close
OnEvent>KEY_DOWN,VK27,0,Quit
END>Event

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Post by gdyvig » Tue Apr 20, 2010 10:52 pm

Hi Bearhunter,

Try placing the OnEvent outside SRT>Event. I usually place all the OnEvents at the top of my script. Then the SRTs. Then the rest of the script.

I'm not sure how OnEvents are loaded, but I suspect it was not loaded when you pressed the Esc key.


Gale

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts