Macro Help

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Aragarn
Newbie
Posts: 1
Joined: Sat Feb 13, 2010 5:16 pm

Macro Help

Post by Aragarn » Sat Feb 13, 2010 5:25 pm

HI all im new here and i try make a macro but i have some problems !! I try make a macro for a game , i wanna my macro start when i press a button , then when i press other buton make the sequence press f1 wait then Lclick
and when pres other button to stop macro !!

Here is the code : but now when i press num 5 the macro start press f1 and Lclick forever ! can any help me pls with some ideas

SetFocus>MY Game name
WaitKeyDown>VK101
Label>start
//Recorded Events
Let>WW_TIMEOUT=-5
CapsOff
Press F1
wait 0.1
LClick
goto start

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Sat Feb 13, 2010 10:54 pm

Hi Aragarn,
Aragarn wrote:but now when i press num 5 the macro start press f1 and Lclick forever ! can any help me pls with some ideas
Its repeating forever because that's what you've programmed it to do... try the following instead and let us know how it works for you...

Code: Select all

SetFocus>MY Game name
Label>wait_for_key_press
WaitKeyDown>VK101
//Recorded Events
CapsOff
Press F1
Wait>0.1
LClick
Wait>0.5
Goto>wait_for_key_press
...and welcome to the Forums!
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

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