Archive: Problem with ButtonEvent


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.

Hmm I'll have a look.

-Stu


Thanks, fixed.
http://nsis.sf.net/File:ButtonEvent.zip

I've also removed the /PARENT requirement if your button is on the parent window. The plugin will detect this itself.

-Stu


o.O doesn't seem to work. Same thing happens.


edit: sorry double post


Are you sure? I was unable to reproduce the problem in the latest build. Did you definately install the new version properly?
Modified date for ButtonEvent.dll should be:
23 April 2006, 10:45:17

-Stu


Well you might have forgotten to upload the new file, because the zip file found on http://nsis.sourceforge.net/File:ButtonEvent.zip contains a plugin with modified date Match 29th. I cleared my cache and retried... same thing


Uhm, nope:
http://nsis.sourceforge.net/mediawik...uttonEvent.zip
Downloaded here at college. Zip says the file was last modified 23/04/2006 10:45

-Stu


ah yes... sorry the problem was from my end. It works fine. Thank you :)