Macro not running

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
ultralord
Newbie
Posts: 2
Joined: Mon Jan 24, 2011 11:47 am

Macro not running

Post by ultralord » Mon Jan 24, 2011 11:51 am

I'm currently using Windows 7 and I have created a macro to be used on top of another program, my online game, but the macro doesn't run when I'm in the game. But when I goto another window it starts running. I've done it on another computer with Windows XP and it works fine. Is there a fix for this?

idiot
Macro Veteran
Posts: 152
Joined: Thu Mar 01, 2007 9:21 am

Post by idiot » Wed Jan 26, 2011 2:04 am

sounds like a setfocus issue with the code or most likely your win 7 isn't fully upgraded and is missing some key elements needed possibley the game has updated and your script also needs to be updated depends on what game and what anti hacking/cheating tools they are using also could be as simple as having win 7 graphics settings the same as was for your win xp machine cause if those are not the same then will cause script to act funny if it was not designed for multiple color depths with out knowing what game or see-ing any of your code all we can do is guess more information would be useful hope some of these suggestions help
if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!

ultralord
Newbie
Posts: 2
Joined: Mon Jan 24, 2011 11:47 am

Post by ultralord » Wed Jan 26, 2011 10:04 am

the macro is very very simple

Label>start
press f1
wait>0.05
press f2
wait>0.05
press f3
wait>0.05
press f4
wait>0.05
press f5
wait>0.05
Goto>start

But doesn't seem to run in the game but runs when i click out of the game, for example clicking into the desktop and it starts working.

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Wed Jan 26, 2011 3:20 pm

I agree with "idiot" that it is most likely a setfocus issue.

SetFocus>Add the window title here
Wait>0.5
Label>start
press f1
wait>0.05
press f2
wait>0.05
press f3
wait>0.05
press f4
wait>0.05
press f5
wait>0.05
Goto>start

idiot
Macro Veteran
Posts: 152
Joined: Thu Mar 01, 2007 9:21 am

Post by idiot » Wed Feb 02, 2011 10:20 pm

ok try this code using vk_keys to do same thing as your code
get the vk_key codes / http://www.mjtnet.com/vkcodes.htm /
this is just the first 2 button presses but should get you started

Code: Select all

SetFocus>Add the window title here
wait>0.05
//this is where you set the vk_code for button press //
Let>VK_F1=112
Let>ExtendedKey=1
Let>KeyUp=2
//press key down//
LibFunc>user32.dll,keybd_event,r,VK_F1,ExtendedKey,0
//time to wait before releasing key//
Wait>0.0
//release key//
Let>FLAGS={%ExtendedKey% OR %KeyUp%}
LibFunc>user32.dll,keybd_event,r,VK_DOWN,0,FLAGS,0
wait>0.05
//this is where you set the vk_code for button press //
Let>VK_F2=113
Let>ExtendedKey=1
Let>KeyUp=2
//press key down//
LibFunc>user32.dll,keybd_event,r,VK_F2ExtendedKey,0
//time to wait before releasing key//
Wait>0.0
//release key
Let>FLAGS={%ExtendedKey% OR %KeyUp%}
LibFunc>user32.dll,keybd_event,r,VK_DOWN,0,FLAGS,0
wait>0.05

if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!

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