Problem with ButtonEvent
I'm having trouble with ButtonEvent Plugin by Afrow_UK. I used the plugin to add two buttons to the components page, however, when I click "Install" after I had clicked either one of the buttons the installer acts as if one of the buttons was clicked. When I click "Install" without having clicked one of the buttons, it works fine.
Function ShowComponents
ButtonEvent::AddEventHandler /NOUNLOAD 1068
ButtonEvent::AddEventHandler /NOUNLOAD 1069
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $1 $0 1068
SendMessage $1 ${WM_SETTEXT} 0 "STR:$(langstring18)"
GetDlgItem $2 $0 1069
SendMessage $2 ${WM_SETTEXT} 0 "STR:$(langstring19)"
FunctionEnd
Function PostComponents
ButtonEvent::WhichButtonID /NOUNLOAD
Pop $R1
${If} $R1 = 1068
${OrIf} $R1 = 1069
MessageBox MB_OK "Button Event"
Abort
${EndIf}
FunctionEnd
For example, I click on the button with control ID 1068, a message box "Button Event" shows up. However, afterwards I click the "Install" button and the message box shows up again even though it's not supposed to. I checked ButtonEventMUI.nsi and couldn't find where I had gone wrong. ShowComponents and PostComponents are the SHOW and LEAVE functions respectively.