03-03-2015, 01:13 PM
Macro Macro2511
or
Macro Macro2512
;Adds tray icon and stays running.
;Sub-function TrayProc is called on mouse events.
if(getopt(nthreads)>1) ret
type VARIABLES_53946g x str's
VARIABLES_53946g k
k.x=74
Tray t.AddIcon("notepad.exe" "QM - run Notepad" 0 &sub.TrayProc &k)
MessageLoop
#sub TrayProc
function Tray&tray msg
VARIABLES_53946g& k=+tray.param
sel msg
,case WM_LBUTTONUP
,sel GetMod
,,case 0
,,out k.x
,,run "notepad.exe"
,,case 2 shutdown -7
,
,case WM_RBUTTONUP
,sel ShowMenu("1 Run notepad[]2 Exit")
,,case 1 run "notepad.exe"
,,case 2 shutdown -7or
Macro Macro2512
;Adds tray icon and stays running.
;Sub-function TrayProc is called on mouse events.
if(getopt(nthreads)>1) ret
type Tray_53946g :Tray'_ x str's
Tray_53946g t
t.x=74
t.AddIcon("notepad.exe" "QM - run Notepad" 0 &sub.TrayProc)
MessageLoop
#sub TrayProc
function Tray_53946g&t msg
sel msg
,case WM_LBUTTONUP
,sel GetMod
,,case 0
,,out t.x
,,run "notepad.exe"
,,case 2 shutdown -7
,
,case WM_RBUTTONUP
,sel ShowMenu("1 Run notepad[]2 Exit")
,,case 1 run "notepad.exe"
,,case 2 shutdown -7