v2.0-a079-be5df98 - not operator and Hotkey function Topic is solved

Discuss the future of the AutoHotkey language
User avatar
Ragnar
Posts: 108
Joined: 30 Sep 2013, 15:25

v2.0-a079-be5df98 - not operator and Hotkey function

21 Jun 2017, 06:40

Unlike the "!" operator, the "not" operator doesn't work. Is this intended?

The following example(s) from _If.htm:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


throws the following error if I press NumpadAdd on the taskbar. Did I do something wrong here?

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Edit: Ah sorry, wrong topic. I thought this refers to the new version generally, not just to the loop statements.
lexikos
Posts: 5415
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: v2.0-a079-be5df98 - not operator and Hotkey function

21 Jun 2017, 23:09

I split the topic.

No, the not operator failing to work is not intended.

Many of the examples haven't been updated with the new syntax (perhaps the majority of examples, except on the main pages like "Scripts" and "Variables"). The syntax shown in that example is incorrect. The Hotkey function needs the text of the expression, not the result of evaluating it. Hotkey "If", MouseIsOver("ahk_class Shell_TrayWnd") calls MouseIsOver() immediately and passes the result to the Hotkey function.
lexikos
Posts: 5415
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: v2.0-a079-be5df98 - not operator and Hotkey function  Topic is solved

15 Jul 2017, 22:06

The not operator has been fixed in v2.0-a081.

Return to “AutoHotkey v2 Development”

Who is online

Users browsing this forum: No registered users and 1 guest