Hotkey problem.

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
JohnS
Newbie
Posts: 1
Joined: Thu Jun 19, 2003 12:43 am

Hotkey problem.

Post by JohnS » Thu Jun 19, 2003 1:11 am

I am having a problem to trigger macros when inside a certain game. I have tryed start the macro in windows and then quickly alt+tab back to the game, and then the macro runs just fine inside the game. The problem seemes to be that macroscheduler cant catch my hotkey keystroke when inside the game. If someone knows how to solve my problem i would be wary glad.

Ps: sorry for my bad spelling and gramar but i hope you understand what i mean :)

Lumumba

Post by Lumumba » Thu Jun 19, 2003 11:15 am

You wanna start a macro while the focus is on the game?
I assume there's a condition which is your trigger to start the macro.

So create a macro which runs "standby" and checks itself if the condition is meet (to confirm the AskPrompt is the Hotkey equivalent).

Code: Select all

Let>GameTitle=Leisure Suite Larry
Let>HealthBarXCoord=100
Let>HealthBarYCoord=80
Let>MortalColor=255
WindowAction>1,Leisure Suite Larry

Label>CheckHealthStatus
GetPixelColor>%HealthBarXCoord%,%HealthBarYCoord%,result
If>result=%MortalColor%,LetsAsk,CheckHealthStatus

Label>LetsAsk
Ask>Wanna stay alive?,answer
If>answer=YES,DoSomethingClever,CheckHealthStatus

Label>DoSomethingClever
.
.
.

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