-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Feat Provide
π Search keywords
forums https://www.autohotkey.com/boards/viewtopic.php?f=76&t=130812&p=575849#p575849
Hotkey,If, Expression https://www.autohotkey.com/docs/v1/lib/Hotkey.htm#If
π» Exp Code
#Requires AutoHotkey v1.1.33.11
#SingleInstance Force
#Warn All, MsgBox
global x := "`t"
Hotkey, If, x = "`t" ;#1
Hotkey, F2, foo1, On
Hotkey, If, % "x = """ A_Tab """" ; #3 .eq. x = "\t" case ...
Hotkey, F3, foo2, On
Hotkey, If, true
Hotkey, F11, foo_set_space, On
Hotkey, F12, foo_set_t, On
#If x = "`t" ;#2
#if true
foo1() {
MsgBox, 1
}
foo2() {
MsgBox, 222
}
foo_set_space() {
x := "`t"
MsgBox, % "x is tab"
}
foo_set_t() {
x := A_Space
MsgBox, % "x is space"
}like it
Details
#Requires AutoHotkey v1.1.33.11
#SingleInstance Force
#Warn All, MsgBox
global x := "`t"
#If x = "`t"
~F2:: foo1()
~F3:: foo2()
#if true
~F11:: foo_set_space()
~F12:: foo_set_t()
foo1() {
MsgBox, 1
}
foo2() {
MsgBox, 222
}
foo_set_space() {
x := "`t"
MsgBox, % "x is tab"
}
foo_set_t() {
x := A_Space
MsgBox, % "x is space"
}Research
#1should text equal#2, and not allowed variations.#3after translation should text equal#2, and not allowed variations.
exp:
- if
#2look like#If x = "t"` - then
#1should beHotkey, If, x = "t"` - and
#3should beHotkey, If, % "x = """ A_Tab """"
A guess is that although #if accepts expressions later, when Hotkey, If, searches, it is obtained directly from the .ahk file without any changes. Maybe this can provide higher performance?
Or is it just better to implement?
...I'm not interested in the internal implementation of ahk, but I am interested in grammar and completion, but I haven't figured out how to implement it yet.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels