Command xx := A??

Ask gaming related questions
kallera
Posts: 17
Joined: 24 Sep 2017, 20:35

Command xx := A??

06 Jul 2018, 22:31

I have commands:

MainWindow := H
SecWindow := S

Next command is:
MsgBox, 0, Info, Main: %Mainwindow%`nI and Sec: %SecWindow%`n

Shows nothing (empty in the messagebox) for both variables (they are earlier defined as globals: global MainWindow and global SecWindow).
What could be wrong? MainWindow should show H and SecWindow S of course. Quotes needed?

Many thanks.

--=kallera=--
hunter99
Posts: 118
Joined: 20 Jan 2014, 17:57

Re: Command xx := A??

07 Jul 2018, 00:48

See the help file -> AutoHotkey.chm
Variables and Expressions section
"By contrast, the expression method uses the colon-equal operator (:=) to store numbers, quoted strings, and other types of expressions."
Would have saved yourself a lot of typing, let alone the wait, if you had tried your last suggestion.
"What could be wrong? MainWindow should show H and SecWindow S of course. Quotes needed?"
hunter99
kallera
Posts: 17
Joined: 24 Sep 2017, 20:35

Re: Command xx := A??

07 Jul 2018, 12:36

Ah, ok. :)

Should have searched the help files. Or at least tested. *facepalm*

Thank you very much.

--=kallera?--

Return to “Gaming”

Who is online

Users browsing this forum: Google [Bot] and 22 guests