oMBRa Posted June 20, 2009 Share Posted June 20, 2009 (edited) my button keep clicking itself and this is driving me mad, here is the code: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> $oIE = _IECreateEmbedded() $GUI = GUICreate('example', 500, 500, -1, -1) GUICtrlCreateObj($oIE, 10, 40, 400, 300) $button = GUICtrlCreateButton('click me', 100, 400, 100, 30) GUISetState() _IENavigate ($oIE, "www.google.com") While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $button _IENavigate($oIE, 'www.google.com') MsgBox(0, '', '') EndSelect WEnd Edited June 20, 2009 by oMBRa Link to comment Share on other sites More sharing options...
tommeke228 Posted June 20, 2009 Share Posted June 20, 2009 (edited) #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> $oIE = _IECreateEmbedded() $GUI = GUICreate('example', 500, 500, -1, -1) GUICtrlCreateObj($oIE, 10, 40, 400, 300) $button = GUICtrlCreateButton('click me', 100, 400, 100, 30) GUISetState() _IENavigate ($oIE, "www.google.com") While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $button _IENavigate($oIE, 'www.google.com') MsgBox(0, '', '') EndSelect WEnd Edited June 20, 2009 by tommeke228 Link to comment Share on other sites More sharing options...
oMBRa Posted June 20, 2009 Author Share Posted June 20, 2009 you did nothing ? Link to comment Share on other sites More sharing options...
tommeke228 Posted June 20, 2009 Share Posted June 20, 2009 you did nothing ?include <GUIConstantsEx.au3>->#include <GUIConstantsEx.au3>it can be this Link to comment Share on other sites More sharing options...
oMBRa Posted June 20, 2009 Author Share Posted June 20, 2009 (edited) no it was just a typo but that's not the problem EDIT: I solved it... stupid me Case $button should be Case $nMsg = $button Edited June 20, 2009 by oMBRa Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now