11-01-2016, 06:41 PM
Dear ALL,
I'm new to quick macros which I bought last week.
My code for monitoring popups windows & closes it automatically:
Trying to figure out how to build a macro that monitors open windows (which I have figured out & working), but exiting it with the (complicated) code below so I can control it from the tray ?
I'm new to quick macros which I bought last week.
My code for monitoring popups windows & closes it automatically:
str Icon = "C:\ProgramData\Microsoft\Windows\DeviceMetadataCache\dmrccache\en-US\43345e90-d918-4991-a540-b395c5cf86ff\DeviceInfo\S2240_S2340.ico"
int count = 0
str s = 0
MES m
m.style="YNCn"
m.x=100
m.y=1
m.timeout=1
m.default='C'
Tray t.AddIcon(Icon "0")
rep
wait 0 WC win("Security Alert")
int w1=win("Security Alert" "#32770") ;;get window handle
act w1
clo w1
count = count + 1
s = count
t.AddIcon(Icon s)
Trying to figure out how to build a macro that monitors open windows (which I have figured out & working), but exiting it with the (complicated) code below so I can control it from the tray ?
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
if(!ShowDialog("dialog_tray_icon" &dialog_tray_icon 0)) ret
BEGIN DIALOG
0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
2 Button 0x54030000 0x4 120 116 48 14 "Hide"
3 Button 0x54032000 0x0 172 116 48 14 "Exit"
END DIALOG
DIALOG EDITOR: "" 0x2030300 "*" "" ""
ret
messages
sel message
case WM_INITDIALOG
Tray-- t_ti
t_ti.AddIcon("$qm$\copy.ico" "tooltip" 5 hDlg)
clo hDlg ;;hide
case WM_DESTROY
t_ti.Delete
case WM_USER+101
sel lParam
case WM_LBUTTONUP ;;on left click tray icon
gShow
act hDlg; err
case WM_RBUTTONUP ;;on right click tray icon
sel ShowMenu("1 Show[]2 Exit" hDlg)
case 1 goto gShow
case 2 goto gExit
case WM_COMMAND goto messages2
ret
messages2
sel wParam
case IDCANCEL ;;Hide, X
min hDlg; hid hDlg; ret
case 3 ;;Exit
gExit
DT_Cancel hDlg
ret 1