I'll try to explain this in the order I found it:
Starting here, looking at A_ThisHotkey: https://lexikos.github.io/v2/docs/Variables.htm#h
In the first paragraph there's a link for "ThisHotkey" which links to: https://lexikos.github.io/v2/docs/Hotkeys.htm#HotBraces
The text there talks about a function, but it seems like that example has suffered changes and the function is no longer there. But I've seen that at the end of the same page there's some talk about that and there's an example with that variable ( https://lexikos.github.io/v2/docs/Hotkeys.htm#Function )
Summarizing:
- "ThisHotkey" link probably needs to point to the end of Hotkeys' page.
- And the description regarding the first example needs a bit of review.
[v2] ThisHotkey doc problems Topic is solved
Re: [v2] ThisHotkey doc problems
the braces define the (in-ahk-code-unnamed) function. which has 1 (in-ahk-code-invisible) parameter. which is called ThisHotkey. in other words:
Code: Select all
q::{
MsgBox ThisHotkey ; q
}
Re: [v2] ThisHotkey doc problems
I'm not sure what to say.
I couldn't had understood that without your comment.
I couldn't had understood that without your comment.
Re: [v2] ThisHotkey doc problems
swagfag's example helps. Suggestion: change the current example
#n::Run "notepad"
to this two-liner
#n::Run "notepad"
#q::MsgBox(ThisHotkey) ;shows '#q'
And add ThisHotkey to the v2 doc index.
#n::Run "notepad"
to this two-liner
#n::Run "notepad"
#q::MsgBox(ThisHotkey) ;shows '#q'
And add ThisHotkey to the v2 doc index.
Re: [v2] ThisHotkey doc problems Topic is solved
Thanks for reporting. Changes added in PR #492.