I can not seem to hotkey numbers? 1:: dose not work when I press "1" to activate the script?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
itisme
Posts: 8
Joined: 21 Sep 2019, 08:44

I can not seem to hotkey numbers? 1:: dose not work when I press "1" to activate the script?

17 Oct 2022, 18:37

This does not work... when I press "1" to start/stop the script

Code: Select all

1::
    if !T
	gosub Press_e
    SetTimer, Press_e, % (T:=!T) ? 1000 : "Off"
return


Press_e:
    send 1
return
This does work when I press F2 to start / stop the script.

Code: Select all

F2::
    if !T
	gosub Press_e
    SetTimer, Press_e, % (T:=!T) ? 1000 : "Off"
return


Press_e:
    send 1
return
How do I use numbers (not the numpad numbers) as hotkeys?

Thanks
User avatar
boiler
Posts: 17206
Joined: 21 Dec 2014, 02:44

Re: I can not seem to hotkey numbers? 1:: dose not work when I press "1" to activate the script?

17 Oct 2022, 18:53

The problem is not that it’s a number, it’s that it’s the same key that you’re sending, which re-triggers your hotkey. Put a $ in front of the hotkey label. Explained here.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 195 guests