v1 Menu Tray Tip command equivalent Topic is solved

Get help for the alpha version of AutoHotkey v2 here. Please state the v2 version you are working with in the title when making a new topic.
Posts: 139
Joined: 22 Apr 2016, 06:50

v1 Menu Tray Tip command equivalent

24 Jul 2020, 07:27

New to v2, I like to use this v1 command:

Code: Select all

Menu, Tray, Tip, My TrayTip
What is the equivalent command in v2?

BTW, Is there ATM an issue with #Warn command?
According to v2 help, #Warn All, Off ; Disable all warnings. This is the default state.
When running this sole command

Code: Select all

x := y    ; y hasn't been assigned a value.
I will get twice a Warning: This variable has not been assigned a value.


[Mod edit: Moved to 'Asked For Help > v2'.]
Posts: 7294
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: v1 Menu Tray Tip command equivalent  Topic is solved

26 Jul 2020, 01:48

Code: Select all

A_IconTip := "My TrayTip"
The #Warn example is out of date. See near the top of the page.
Note: The UseUnset warnings are enabled by default. Disabling them is not recommended as there are plans to remove the option and replace the warning with an error.
You do not get the same warning twice; the first one (which has a different message) happens before the script runs, because it has detected that there is no assignment to the var anywhere in the script. This warning is not yet documented, except in v2-changes and the "updates" topic.
#Warn UseUnset now also warns at load time if possible. A warning is given for the first reference to each variable which is never used in any of the following ways:
  • As the target of a direct, non-dynamic assignment.
  • Passed to an output var or ByRef parameter in a non-dynamic function call. To avoid a warning for dynamic calls, the script may initialize the variable before passing it to the function.
  • Passed to IsSet in a non-dynamic function call. For instance, a script which contains IsSet(MyLib_Global) will not warn about any other references to MyLib_Global in the same scope.
Source: v2-changes
Posts: 7294
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: v1 Menu Tray Tip command equivalent

26 Jul 2020, 05:19

#Warn has been changed for v2.0-a119, and the documentation has been updated (see #Warn VarUnset).

Return to “AutoHotkey v2 Help”

Who is online

Users browsing this forum: No registered users and 1 guest