Closing ALL Internet Explorer Windows: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Wikipedia python library)
 
m (Updated author and download links, and changed format of some pages.)
Line 22: Line 22:
Simon H
Simon H


Page author: simham_uk
Page author: [[User:simham_uk|simham_uk]]

Revision as of 12:19, 23 April 2005

Description

Thanks to Sunjammer I have managed to finally get this to work..so here's the code. I use it in the init function but it can be used anywhere.

The Script

; Kill all instances of Internet Explorer
Function .onInit 
;Closing all IE Windows
loop:
    FindWindow $0 "IEFrame"
    IntCmp $0 0 done
    IsWindow $0 0 done
    System::Call 'user32::PostMessageA(i,i,i,i) i($0,${WM_CLOSE},0,0)'
    Sleep 100
    Goto loop
done:
FunctionEnd

Hope this is useful to someone

Simon H

Page author: simham_uk