Changing code from button click

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
s0gy
Posts: 7
Joined: 26 May 2022, 13:57

Changing code from button click

Post by s0gy » 27 May 2022, 16:20

I want to have a code where the timing can be altered, I have a gui pop up then I want to be able to click a button on the gui that will then change the timings for my code.

Any help is appreciated.

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Changing code from button click

Post by BoBo » 27 May 2022, 23:59

Untested concept…

Code: Select all

#SingleInstance, Force
SetWorkingDir % A_ScriptDir

IniRead, value,% A_ScriptName, section, key
SetKeyDelay := value

F11::Send % "We've been this fast: " value

F12::
InputBox, newValue, TheSpeeder, How fast next time?
    IniWrite,% newValue,% A_ScriptName, section, key
Reload

/*
    [section]
        key=500
*/

Post Reply

Return to “Ask for Help (v1)”