Help with simple repeat key gui keybind script

Get help with using AutoHotkey and its commands and hotkeys

Help with simple repeat key gui keybind script

14 Jun 2018, 07:51

Hi guys i'm not a programmer or coder and have a problem which might be simple to u guys.
the script below is meant to use ins to launch
and key in an alphabet, save and after that the alphabet keyed , i'd be able to hold it down and repeat the alphabet

problem is when i launch the program again without reloading script to change hotkey, the previous hotkey would then be unusable

if possible, can i have the previous key be usable without reloading the script?

Code: Select all

Gui, Destroy

Gui, Add, Text, x17 y8 w120 h20, Turbo Key: 

Gui, Add, Edit, xp yp+30 wp hp vTurbokey, %Turbokey%

Gui, Add, Button, x27 y258 w70 hp gOK, SAVE

Gui, Add, Button, xp+150 yp wp hp gReset, Reset

Gui, Show, x279 y227 h298 w477


Gui, Submit
suspend, off

Gui, hide
suspend, off


Gui, Submit, hide
suspend, off
SplashTextOn ,100 ,30 , SAVED, %Turbokey%
sleep 1000

Hotkey, %Turbokey%, RemapTurbo 

While GetKeyState(Turbokey,"P") 
SetKeyDelay, 0, 50
send %Turbokey%

User avatar
Posts: 4413
Joined: 27 Feb 2014, 12:30

Re: Help with simple repeat key gui keybind script

14 Jun 2018, 13:19

Well, there is a Hotkey GuiControl in AHK, but it's a bit limited, and it doesn't save the settings between runs like you want, or even bind the hotkey that you pressed, you would have to code that yourself
AppFactory has a decent key binding system, and will save settings between runs for you. There's a little bit of a learning curve (You need to use functions), but it's not too hard.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot] and 37 guests