Using variables
Posted: 20 Oct 2017, 07:07
Hi!
Just discovered AutoHotKey and it's fantastic!
I'm trying to write some scripts and I have a very basic problem: I don't understand how variables are supposed to work. I HAVE seen the page https://autohotkey.com/docs/Variables.htm but it doesn't help me.
In ording to test setting and retrieving a variable, I'm trying to set a certain value (ex:12) to a variable, then display it in a message box when hotkey pressed. Here's what I have:
If I do so, the Message box displays an empty value.
Can someone please explain more clearly than the documentation how variables are supposed to work?
Thanks !!
Best,
Thomas
NB : I'm not a dev nore a super-geek so don't hesitate to be very basic in your explanations. I do have some programming notions though, so not problem with the concept of variable itself.
Just discovered AutoHotKey and it's fantastic!
I'm trying to write some scripts and I have a very basic problem: I don't understand how variables are supposed to work. I HAVE seen the page https://autohotkey.com/docs/Variables.htm but it doesn't help me.
In ording to test setting and retrieving a variable, I'm trying to set a certain value (ex:12) to a variable, then display it in a message box when hotkey pressed. Here's what I have:
Code: Select all
MyVar:=12
^F4:: MsgBox, %MyVar%
Can someone please explain more clearly than the documentation how variables are supposed to work?
Thanks !!
Best,
Thomas
NB : I'm not a dev nore a super-geek so don't hesitate to be very basic in your explanations. I do have some programming notions though, so not problem with the concept of variable itself.