❓ Toggle between modes? [AHK]

Posts 1–2 of 2 · Page 1 of 1
❓ Toggle between modes? [AHK]
I currently have a code for rapid fire with Chicom, which works pretty well. And now I had the idea of creating a toggle key so you can switch between modes (Chicom, M4A1, BER etc.), How would i do that? My code is as follows:
Code:
~F6::Suspend
 $Lbutton::
Random, SleepTime, 150, 160
loop{
GetKeyState, keystate, Lbutton,P
if keystate = U
	break
else
Click, Left, 1
Sleep, %SleepTime%
 }
Edit: Also if possible, I'd like to make it display a tooltip showing which mode you're in.

Edit2: I figured it out, for people who are interested, this is what i did:
Code:
Mode = 0
~F6::Suspend

    *m::           
If (Mode = 0)
{
	Mode = 1
	ToolTip, CHICOM
	Sleep, 500
	ToolTip
	Random, SleepTime, 150, 160
}
Else If (Mode = 1)
{
	Mode = 2
	ToolTip, M4A1
	Sleep, 500
	ToolTip
	Random, SleepTime, 400, 400
}
Else If (Mode = 2)
{
	Mode = 0
	ToolTip, BER
	Sleep, 500
	ToolTip
	Random, SleepTime, 800, 800
}

 $Lbutton::
loop{
GetKeyState, keystate, Lbutton,P
if keystate = U
	break
else
Click, Left, 1
Sleep, %SleepTime%
 }
 Return
Ignore me, I'm stupid, I just reread the script and realized my idiocy...
Posts 1–2 of 2 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us