Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label to Func with hotkeys #322

Open
Banaanae opened this issue Jan 3, 2025 · 0 comments
Open

Label to Func with hotkeys #322

Banaanae opened this issue Jan 3, 2025 · 0 comments

Comments

@Banaanae
Copy link
Collaborator

Banaanae commented Jan 3, 2025

V1:

f::
MsgBox, You pressed f!
Return

g::MsgBox, You pressed g!

h::
GoSub, f
GoSub, g
Send, f
Send, g
Goto, f
Return

V2 (Converted):

f():
{ ; V1toV2: Added bracket
global ; V1toV2: Made function global
MsgBox("You pressed f!")
Return
} ; V1toV2: Added Bracket before hotkey or Hotstring

g(){
   :MsgBox("You pressed g!")
}

h::
{ ; V1toV2: Added bracket
global ; V1toV2: Made function global
f()
g()
Send("f")
Send("g")
f()
Return
} ; V1toV2: Added bracket in the end

V2 (Expected):

Hotkey("f", AHKey_f)
Hotkey("g", AHKey_g)

AHKey_f(*)
{ ; V1toV2: Added bracket
global ; V1toV2: Made function global
MsgBox("You pressed f!")
Return
} ; V1toV2: Added Bracket before hotkey or Hotstring

AHKey_g(*){
   MsgBox("You pressed g!")
}

h::
{ ; V1toV2: Added bracket
global ; V1toV2: Made function global
AHKey_f()
AHKey_g()
Send("f")
Send("g")
AHKey_f()
Return
} ; V1toV2: Added bracket in the end

The AHKey_ can be changed, just a placeholder for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant