Archive: onUserAbort


onUserAbort
I want to add onUserAbort in my script but I got the error

Function already exist

but I check my code and the function is not already existing !

can you help me


Thx !


I just read that onUserAbort is no mor in modern IU

but how i can make it happen


Have another look at the MUI ReadMe. Here is an extract from it to help you get started:

Customize Modern UI Functions

If you want add your own code to functions inserted by the Modern UI, such as the .onGUIInit function and the Page functions, create your own function and let the Modern UI functions call them. Use the defines to define the name of your functions.

Example:

!define MUI_CUSTOMFUNCTION_GUIINIT myGuiInit

Function myGUIInit
...your own code...
FunctionEnd

Open/Close section General Custom Functions

These defines should be set before inserting the language macros.

MUI_CUSTOMFUNCTION_GUIINIT function
MUI_CUSTOMFUNCTION_UNGUIINIT function
MUI_CUSTOMFUNCTION_ABORT function

MUI_CUSTOMFUNCTION_UNABORT function


But, it ok do make a custom function but how to make it happen when the person will click on cancel..or the X...

????


But, it ok do make a custom function but how to make it happen when the person will click on cancel..or the X...
If you are using the MUI system then all you need to do is use the following line in your script:

!define MUI_ABORTWARNING

If you compile the Basic.nsi script in the "Examples\Modern UI" folder you will find that clicking the Cancel button or the X at the top-right causes a message box to appear.

If you remove (or comment-out) the "!define MUI_ABORTWARNING" line from the Basic.nsi script and rebuild it then clicking Cancel or the X will make the program exit without displaying any message.

Originally posted by pengyou
If you are using the MUI system then all you need to do is use the following line in your script:

!define MUI_ABORTWARNING

If you compile the Basic.nsi script in the "Examples\Modern UI" folder you will find that clicking the Cancel button or the X at the top-right causes a message box to appear.

If you remove (or comment-out) the "!define MUI_ABORTWARNING" line from the Basic.nsi script and rebuild it then clicking Cancel or the X will make the program exit without displaying any message.
Is it possible to abort the cancelation and jump to next page when the user press "Cancel" button? I would like to customize the "Cancel" button for some purpose. Thanks. :)