ahk is recognizing this line as a comment and not a hotkey ;::AnyKeyPress(";", 2800,…
- User
ahk is recognizing this line as a comment and not a hotkey ;::AnyKeyPress(";", 2800, 1715) ;c+
- Assistant
In AutoHotkey (AHK), lines that start with a semicolon (
;) are treated as comments. To define a hotkey in AHK using the semicolon key, you'll need to ensure that the semicolon itself is part of the hotkey definition rather than starting the line as a comment.For your specific example, to use the semicolon (
;) as a hotkey, you can structure your script like this:;:: ; <-- This part ensures that the semicolon is recognized as a hotkey { AnyKeyPress(";", 2800, 1715) ;c+ }Alternatively, if you want the hotkey on a single line without a block, you could write:
;:: AnyKeyPress(";", 2800, 1715) ;c+ returnIn this setup:
- The
;::at the start of the line specifies that the semicolon key is a hotkey trigger. - The
{ }block or the separatedreturnkeyword allows you to execute the specifiedAnyKeyPressfunction when the semicolon key is pressed.
- The