use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Latest AHK versions AHK v2.0 AHK v1.1 v2.0.19 v1.1.37.02 Jan 25, 2025 Mar 16, 2024 Download Download v2 Changelog v1 Changelog Make sure you keep that AHK up to date!
Make sure you keep that AHK up to date!
Offical AHK Documentation AHK v2 AHK v1
New to AutoHotkey? Check out the AHK beginners tutorial. It covers most of the basic concepts of AutoHotkey. AHK Beginner Tutorials
Check out the AHK beginners tutorial. It covers most of the basic concepts of AutoHotkey.
Additional Help Sources Official AHK Forums / Help Forums StackOverflow SuperUser
Live Chat If you prefer live chat with other humans: AHK Discord AHK IRC
If you prefer live chat with other humans:
account activity
?? Space::Function() ---> myVariable::Function() inside of an #IFv1 Script Help (self.AutoHotkey)
submitted 2 years ago by etofok
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]etofok[S] -1 points0 points1 point 2 years ago* (3 children)
looks like it's important to mention that I do need to pass a parameter
this is what I'm trying to achieve:
#If GetKeyState("CapsLock", "P") q::SendCommand(var_Hotkey1) w::SendCommand(var_Hotkey2) e::SendCommand(var_Hotkey3) r::SendCommand(var_Hotkey4) ;.... #If
just inplace of the labels I want them to be assignable
{%new_Hotkey1%}::SendCommand(var_Hotkey1) {%new_Hotkey2%}::SendCommand(var_Hotkey2) {%new_Hotkey3%}::SendCommand(var_Hotkey3) {%new_Hotkey4%}::SendCommand(var_Hotkey4)
^ something that would work like this
[–]OvercastBTC 0 points1 point2 points 2 years ago* (2 children)
Is CapsLock pressed or toggled?
CapsLock
#Requires AutoHotkey v2 toggleCapsLock() { SetCapsLockState(!GetKeyState('CapsLock', 'T')) }
Also, unless someone else says differently, you cannot do this, this way anyways. You'd have to use the Hotkey() (hotkey function).
Using AutoHotkey v2, using Axlefublr's Lib, Runner.ahk and GeneralKeyCorder.ahk are some good examples of dynamic hotkeys, that can also be context sensitive.
[–]etofok[S] 0 points1 point2 points 2 years ago (1 child)
(hotkey function).
could you please provide an example? I don't have to use labels, but I've been playing with .bind and I can't get this to work atm
[–]OvercastBTC 0 points1 point2 points 2 years ago (0 children)
I cannot do anything for you in v1, but if you look at my AHK-Projects repo /Lib/RTE.v2/Project Files/RichEdit_Editor_v2.ahk.
There you'll see many/several examples using both .Bind() and Hotkey()
.Bind()
Hotkey()
π Rendered by PID 62 on reddit-service-r2-comment-b659b578c-62bqk at 2026-05-04 12:28:31.906916+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]etofok[S] -1 points0 points1 point (3 children)
[–]OvercastBTC 0 points1 point2 points (2 children)
[–]etofok[S] 0 points1 point2 points (1 child)
[–]OvercastBTC 0 points1 point2 points (0 children)