Closing ALL Internet Explorer Windows: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Added category links.)
m (Adding new author and category links.)
Line 1: Line 1:
{|align=right
{{PageAuthor|simham_uk}}
|<small>Author: [[{{ns:2}}:simham_uk|simham_uk]] ([[{{ns:3}}:simham_uk|talk]], [[{{ns:-1}}:Contributions/simham_uk|contrib]])</small>
 
|}
<br style="clear:both;">
== Description ==
== 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.
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.
Line 26: Line 24:
Simon H
Simon H


[[{{ns:14}}:System Plugin Examples]]
[[Category:System Plugin Examples]]

Revision as of 11:56, 24 June 2005

Author: simham_uk (talk, contrib)


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