v1 Menu Tray Tip command equivalent Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
need4speed
Posts: 143
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.

Cheers

[Mod edit: Moved to 'Asked For Help > v2'.]
lexikos
Posts: 9621
Joined: 30 Sep 2013, 04:07
Contact:

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
lexikos
Posts: 9621
Joined: 30 Sep 2013, 04:07
Contact:

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 “Ask for Help (v2)”

Who is online

Users browsing this forum: kunkel321 and 45 guests