The above program creates two variables, behind the scenes the AHK interpreter is reserving two memory locations that we now know by the names a and b. In AutoHotkey you don’t need to declare your variables before use, you can simply create them when neededįor example, AutoHotkey has the following simple way of creating variables − a := “” Retrieve and use the stored values from the variables.Ĭreating variables is more commonly called “ declaring variables” in programming as you need to declare your variables before use.ĭifferent programming languages have different ways of creating/declaring variables inside a program/script.Store your values in those two variables.Create two variables with appropriate names.Let me provide an example, assume you want to store two values (20 and 10) in your script and, at a later stage, you want to use these two values. Later, when you update / retrieve from the variable, the computer knows to look at that place in memory.
When you create variables, you’re telling the computer to find a place in memory and store a value there.