AHK syntax(?) help Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
RunarSF
Posts: 27
Joined: 01 Jul 2017, 11:48
Location: Norway
Contact:

AHK syntax(?) help

16 Feb 2018, 08:48

While looking at AHK code, I notice a lot of people use "% something", does this have a name, and what does it do?
There are two kinds of people in the world: those who can extrapolate from incomplete data.
User avatar
boiler
Posts: 17399
Joined: 21 Dec 2014, 02:44

Re: AHK syntax(?) help  Topic is solved

16 Feb 2018, 09:41

It's called forcing an expression. See the documentation here. If a parameter to a command is expected to be in legacy syntax, it says that "something" will instead be an expression. Example:

Code: Select all

MsgBox, 2 * 3 ; legacy syntax
MsgBox, % 2 * 3 ; forced expression
User avatar
RunarSF
Posts: 27
Joined: 01 Jul 2017, 11:48
Location: Norway
Contact:

Re: AHK syntax(?) help

16 Feb 2018, 10:13

Thank you so much!
There are two kinds of people in the world: those who can extrapolate from incomplete data.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: apeironn, Bing [Bot], madensuyu1, peter_ahk and 362 guests