I'm trying to use a global variable. And, I'm not getting it to work.
this works
!q::
fname = text
send, %fname%{enter}
return
this doesn't, no text, just a new line
fname = text
!q::
send, %fname%{enter}
return
What I'm I doing wrong?
Thanks for the help
using a global variable
- Delta Pythagorean
- Posts: 627
- Joined: 13 Feb 2017, 13:44
- Location: Somewhere in the US
- Contact:
Re: using a global variable
You must set the variable BEFORE sending the text.
You may set the variable at the beginning of the script, or you can set the variable inside the hotkey (Like the first example you have)
You may set the variable at the beginning of the script, or you can set the variable inside the hotkey (Like the first example you have)
[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat
Re: using a global variable
thanks
I needed to set the global variable at the beginning of the script.
Thanks
I needed to set the global variable at the beginning of the script.
Thanks