Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How I can close taskbar tasks
#1
I want to close all task,

means IE, HTML, Excel, File downloading, save as etc
#2
Macro Macro1468
Code:
Copy      Help
;out
ARRAY(int) a
win "" "" "" 0 0 0 a
int i h
for i 0 a.len
,h=a[i]
,if(!IsWindowInTaskbar(h) or !IsWindowEnabled(h)) continue
,;outw h
,PostMessage h WM_SYSCOMMAND SC_CLOSE 0

Function IsWindowInTaskbar
Code:
Copy      Help
;/
function! hwnd

;Returns 1 if the window has taskbar button.


int exstyle=GetWinStyle(hwnd 1)
;is appwindow?
if(exstyle&WS_EX_APPWINDOW) ret 1
;is toolwindow?
if(exstyle&WS_EX_TOOLWINDOW) ret
;is owned?
int ho=GetWindow(hwnd GW_OWNER)
if(ho and ho!=GetDesktopWindow) ret

ret 1


Forum Jump:


Users browsing this thread: 1 Guest(s)