Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   MUI enable and disable callback function for cancel button (http://forums.winamp.com/showthread.php?t=316387)

ChocJunkie 19th January 2010 12:21

MUI enable and disable callback function for cancel button
 
Hi,

I want my installer to go to the finish page if the user clicks 'cancel' on any page. Therefore I'm using
code:
!define MUI_CUSTOMFUNCTION_ABORT _onUserAbort

Function _onUserAbort
[...] // calling function for going to finish page
Abort
FunctionEnd



I need to call 'Abort' because otherwise the installer will quit while executing my function called the line above.

I know, 'MUI_CUSTOMFUNCTION_ABORT' sets the function called when hitting the cancle/X button. When I've reached my finish page, I want to disable the functionality and call another function when clicking cancel/X.
Can I do this using MUI_CUSTOMFUNCTION_ABORT or do I have to use NSD_OnClick on every page?

Thanks! :)

CJ

MSG 19th January 2010 13:20

How about just making some If statements in your abort function?

ChocJunkie 20th January 2010 06:43

Yeah ok, I could have thought about that. ^^'
Thank you for your brilliant idea, MSG. :D

ChocJunkie 20th January 2010 07:23

Ok, now I remember why I've asked for another solution in first place.

If the user- abort function will be called, the exit function of the current page will never be called, but I need them to be called.
Any ideas?

Thanks :)

CJ


All times are GMT. The time now is 18:04.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.