Archive: Window was closed detection


Window was closed detection
Is there a way for NSIS to run a program, and then detect if the user closes it or not. If the user closes it, it write an INI string.

I could do with this, since right now I have the Quake2 map compilers running, and on completion it will DetailPrint "Compiling Complete!" However, this will of course still happen if the user closes the compiler program. If the user closes the compiler program, than it really needs to say "Compiling incomplete. ${COMPILER} was closed before completion!"

Thanks for any help :)

-Stuart


The Q2 compiler tools are command line, yes? If so they will probably return a failure code if they are aborted, and that code can be captured by ExecWait. Also all of the nsExec plugin Exec variants can return the exit code. Hope this helps.


How can I get this exit code value?

-Stuart


RFTM: ExecWait docs (E.g. ExecWait "progtorun" $0 puts the exit code in $0).
nsExec docs (E.g. nsExec::Exec "progtotrun" followed by Pop $0 will give the exit code in $0)


Thanks :)
The Exit code for ExecWait is always -1073741510
The Exit code for nsExec is 1

Both completion codes are 0


Another question...
Is there a way to convert the 32bits file times to readable houres and minutes?
What do I divide the integer by?

-Stuart


http://nsis.sourceforge.net/archive/...php?pageid=112