- OnExit: make it accept a function instead of a label. The function would optionally accept an exitReason parameter removing the need for A_ExitReason.
Return value of an OnExit handler: blank/false = normal exit, true = block script exit. - OnMessage: accept function references & generalize to allow filtering by window:
Code: Select all
OnMessage(HWND, MsgNumber [, Function, MaxThreads]) ; if hwnd = 0 then no filtering is applied
- OnClipboardChange: make into a set-handler function like OnExit. Said handler function would accept one parameter (reducing the number of usages of A_EventInfo by one).
- ClipboardAll (& related FileRead/FileAppend behaviour): replace with a more intuitive mechanism that doesn't use a quirky binary variable mode.
- Rename #IncludeAgain to #ForceInclude
- GUI: major redesign to factor in objects & replace usage of labels with functions.
- Menu: major redesign similar to that of GUI.
- Hotkeys and hotstrings: make them functions, e.g.
Disadvantage: no longer possible to fall-through and use Gosub to call the code of a hotkey/hotstring. The latter usage is considerably rare, but the former is not.
Code: Select all
#v:: { MsgBox Command #1 MsgBox Command #2 } #!v::MsgBox Note that oneliners still have the same old and simple syntax
- Remove Gosub: since all functionality that formerly used subroutines has been reworked to use functions, Gosub can now be safely removed. This also includes removing all the built-in variables used for event subroutines.
- @FuncName syntax for inserting function references that are resolved at load-time. @Dynamic%References% also supported.