execao
23rd September 2010 21:34 UTC
cancel a custom page
Hello,
I have a custom page where it is reported the data from the server validation if the data was entered.
StrCmp $ 3 "" stop2 play2
stop2: Pop $ (TEMP)
MessageBox MB_OK | MB_ICONSTOP "$ (TEXT_PORTA_SUBTITLE)"
Abort
play2: Pop $ (TEMP)
Return
On this screen when pressed the Cancel button, it first shows the MessageBox to enter the values and while it does not insert the values to display is not canceled.
I tried to enter the function
Function. OnUserAbort
MessageBox MB_YESNO "Abort install?" IDYES NoCancelAbort
Abort causes; installer to not quit.
NoCancelAbort:
FunctionEnd
But he returns
Function named ". OnUserAbort" already exists
Anyone know a way to cancel a custom page, do not enter the script messagebox
Afrow UK
24th September 2010 11:10 UTC
From what you have posted (which also has invalid syntax) I am guessing you aren't using a leave function?
Stu
execao
29th September 2010 14:27 UTC
Hi Afrow,
I use when I create a page like this
Page custom SetPageTerminal Void
And I have a function without return
Void Function
FunctionEnd
I believe this would return null when used aborted the installation. That is correct?
Thanks
Animaether
29th September 2010 14:56 UTC
you're probably using MUI (or a MUI-derivative), and need to specify a custom user abort function.. e.g.
define MUI_CUSTOMFUNCTION_ABORT myAbortFunction
>
not entirely sure what you're trying to achieve, though.. do you want the installer to exit immediately when canceling that custom page, skipping the "Abort install?" message?
MSG
30th September 2010 21:09 UTC
Originally posted by execao
Hi Afrow,
I use when I create a page like this
Page custom SetPageTerminal Void
And I have a function without return
Void Function
FunctionEnd
I believe this would return null when used aborted the installation. That is correct?
No, this is not correct. Please look up the syntax for declaring functions in NSIS, in the manual.