PDA

View Full Version : Using FindWindow


Repzilon
28th December 2001, 21:05
I almost never used the FindWindow command. So a somewhat old NSIS script can not be compiled

This is the old FindWindow:
FindWindow "prompt" "Winamp 1.x" "You must close Winamp before continuing with the install process"

I read the 1.91 documentation and it says I have to use both FindWindow and SendMessage. How do I use them ?

Schultz
29th December 2001, 01:07
this is from the functions.htm file located in your NSIS dir.
;-------------------------------------------------------------------
; CloseWinamp
;
; Closes all running instances of Winamp 1.x/2.x
;
; modifies no other variables
Function CloseWinamp
Push $0
loop:
FindWindow $0 "Winamp v1.x"
IntCmp $0 0 done
SendMessage $0 16 0 0
Sleep 100
Goto loop
done:
Pop $0
FunctionEnd