Old 11th February 2008, 09:45   #1
mattia83
Junior Member
 
Join Date: Feb 2008
Posts: 20
error call function

Hi,
in this code i have a problem, if i press yes on messagebox i jump on un.a, and this works correctly, but if i press no, i jump on un.b and then in un.a...why this? thx
code:

Function un.onUninstSuccess
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "message" IDYES calla IDNO callb
callb:
call un.b
calla:
call un.a
FunctionEnd

Function un.a
FunctionEnd

Function un.b
FunctionEnd

mattia83 is offline   Reply With Quote
Old 11th February 2008, 09:53   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
code:
!include LogicLib.nsh

Function un.onUninstSuccess
${If} ${Cmd} `MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "message" IDNO`
call un.b
${Else}
call un.a
${EndIf}
FunctionEnd



As for your original code, labels don't stop execution. You'd need a Goto before calla: to jump over the code after it.

Stu
Afrow UK is offline   Reply With Quote
Old 11th February 2008, 10:22   #3
mattia83
Junior Member
 
Join Date: Feb 2008
Posts: 20
thx so much! it works
mattia83 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump