import winex; import winex.mouse; var mouseMoveWnd = function( hwnd ){ if(!hwnd) return; var x,y,cx,cy = win.getPos(hwnd) for(x=1;cx;2){ for(y=1;cy;2){ winex.mouse.move(hwnd,x,y); } } } refreshTrayIcon = function(){ var hwnd = winex.findExists(,,"Shell_TrayWnd","TrayNotifyWnd"); mouseMoveWnd( winex.findEx( winex.findEx(hwnd,,"SysPager") ,,"ToolbarWindow32") ); var _,hwnd = winex.findExists(,,"NotifyIconOverflowWindow","ToolbarWindow32"); mouseMoveWnd( hwnd ); } //清理無效圖標 refreshTrayIcon();
參考
hwnd= winex.findExists(,"通知區域","Shell\_TrayWnd","ToolbarWindow\d+") var re ,rcWindow=GetClientRect(hwnd,::RECT()) for(x=1;rcWindow.right-1;1){ for(y=1;rcWindow.bottom-1;1){ PostMessage(hwnd,0x200/*_WM_MOUSEMOVE*/, 0, y * 65536 + x) } }