Jump to content

my button clicks itself


Recommended Posts

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 by oMBRa
Link to comment
Share on other sites

#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 by tommeke228
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...