Need help making "Home" key able to restart script.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
shitcake96
Posts: 8
Joined: 02 Mar 2021, 09:43

Need help making "Home" key able to restart script.

Post by shitcake96 » 29 Mar 2023, 19:21

Can you please help me make the "Home" key restart the script? Thank you!

Code: Select all

#Persistent

Loop
{
    While GetKeyState("Ins", "T")
    {
        Send {Ctrl down}
        Sleep 0
        Send a
        Sleep 0
        Send {Ctrl up}
        Sleep 0
        Send q
        Sleep 0
        Send {q up}
        Sleep 15000

    }
}

[Mod action: Moved topic to v1 section. The main section is for v2.]

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

Re: Need help making "Home" key able to restart script.

Post by mikeyww » 29 Mar 2023, 20:24

Code: Select all

#Requires AutoHotkey v1.1.33
#MaxThreadsPerHotkey 2
SoundBeep 1500
Home::Reload
~Ins Up::
SetKeyDelay 25, 25
ToolTip % GetKeyState("Ins", "T")
While GetKeyState("Ins", "T") {
 Send ^aq
 SoundBeep 2000
 Sleep 15000
}
Return

Post Reply

Return to “Ask for Help (v1)”