Run script while Alt Tabed

Ask gaming related questions (AHK v1.1 and older)
Planto144
Posts: 1
Joined: 04 Feb 2023, 12:30

Run script while Alt Tabed

Post by Planto144 » 04 Feb 2023, 12:34

I got a script which just holds a for 24s and then holds d for 24s buttons in Minecraft ,i was wondering if it was possible to make it so it would continue working while am alt tabbed

Code: Select all

#MaxThreadsPerHotkey 2			;This you need for it send just 2 Keys (So work a Toggle Script better)
SetBatchLines -1 			;This make your Script faster

*^q::					;With this Key you Start the Script 			

toggle := !Toggle			; "!" are mean False so its just start if you press the Key when you pressed it the "!" false going to be a "True" this means the Script can start.
loop					;Loop means the Script never end
{
If toggle 				;The Toggle := !Toggle is now false if you press "*^q" the Flase go to an True and the Script can start
{ 
Send {d down}				;Here you Copy and Paste what you want to Send, click or something better said, your Script 
sleep, 24500
Send {d up}
Send {a down}
sleep, 24500
Send {a up}
}
else					; This mean if you press again "*^q" he break the Loop, this mean the Loop stopoed
	break
}
return			
any help would be great thanks!

User avatar
mikeyww
Posts: 27140
Joined: 09 Sep 2014, 18:38

Re: Run script while Alt Tabed

Post by mikeyww » 04 Feb 2023, 17:35

Welcome to this AutoHotkey forum!

You can always have a go with :arrow: ControlSend.

Post Reply

Return to “Gaming Help (v1)”