With the 1.44 FindWindowByTitle function I have build an installer that checks if the program is already running and then uses the Prompt parameter to offer an Abort/Rerty/Ignore choice.
With 1.5x this doesn't seem possible anymore? Even using MessageBox I can only test for 2 return values, but not for the Abort/Rerty/Ignore choice?
Is there a good work around, or am I doing something wrong?
Thanks, Andi
FindWindowByTitle with 1.5x version
6 posts
First, grab the latest version of NSIS.
;Example: (sends WM_CLOSE to $0)
FindWindow $0 "" "My apps title"
SendMessage $0 16 0 0
;Example: (sends WM_CLOSE to $0)
FindWindow $0 "" "My apps title"
SendMessage $0 16 0 0
Thanks, but this doesn't let the user decide what to do as previously?
Thanks, Andi
Thanks, Andi
Versions of NSIS greater than 1.61 let you specify 2 tests on the MessageBox command. Prior to that, you could only specify one result. The 3rd result can be tested because the program won't jump if that's the case.
I had a very similar problem right before 1.6 was released because I was trying to offer Abort, Retry, Ignore but had no way to react to all three.
I had a very similar problem right before 1.6 was released because I was trying to offer Abort, Retry, Ignore but had no way to react to all three.
TryAgain:
... do something ...
MessageBox MB_ABORTRETRYIGNORE "What do you want to do?" IDABORT EndInstall IDRETRY TryAgain
... put code here if continue is selected ...
Originally posted by AndiG2You are right. I was half asleep when I wrote it. 😳
Thanks, but this doesn't let the user decide what to do as previously?
Thank you- I didn't even check for later NSIS versions yet :|
😁 Andi😁
😁 Andi😁