Use the Forced Expression Operator (%) to Adapt AutoHotkey Commands On-the-Fly
Most AutoHotkey Version 1.1 commands use plain text as parameters. That means AutoHotkey interprets the text exactly as written—no quotes needed and no variables accepted. In version 1.1, this would limit the commands except for the availability of the traditional (or legacy) double-quote text replacement operator (%var%).
The %var% technique allows us to substitute any variable directly into an AutoHotkey command. However, using the forced expression operator (%) adds even greater flexibility and power to almost any AutoHotkey code. In many cases, rather than developing complicated subroutines, you can use this technique to embed expressions and functions directly into version 1.1 AutoHotkey commands. Continue reading