GUI Help

Ask gaming related questions (AHK v1.1 and older)
Dystopia
Posts: 6
Joined: 08 Apr 2020, 10:02

GUI Help

Post by Dystopia » 02 May 2020, 13:13

Hello again.

I'm trying to make a GUI that toggles on/off various hotkeys. This is what I've come up with so far:

Code: Select all

#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
SetTitleMatchMode, 2
ListLines Off
Process, Priority, , A
SetBatchLines, -1
SetKeyDelay, -1, -1
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
;OPTIMIZATIONS END

; title
GUI, Show, w250 h50, Blaster


;SGP toggle
GUI, Add, CheckBox, vSGP gCheck, SGP


return

;Subroutines
GuiClose:
	ExitApp
	
Check:
	Gui, Submit, NoHide
	
return


;Combos
#if SGP 
	v::
	{
		while GetKeyState(A_ThisHotkey)
		{
			SendInput,	o]
			Sleep, 8
			SendInput,	{space}
			Sleep, 27
		}
	}
Basically what I want to happen is for the V hotkey to be active while the checkbox is ticked, and for it to act as normal when unticked. From this script was derived from here, and from what I can gather it seems to do with "while GetKeyState", but I would like for that to be in the script as well. Thanks!

Return to “Gaming Help (v1)”