thelex Posted June 23, 2008 Share Posted June 23, 2008 So i have this little IE browser, and the deal is, it have a "address bar" but when i clock "Go" nothing happens, dont know whats wrong... #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> #NoTrayIcon $IE = _IECreateEmbedded() $GUI = GUICreate("TEST", 500, 200, -1,-1,($WS_EX_LAYERED)) $input = GUICtrlCreateInput ("", 0, 0, 450, 20) $IEGUI = GUICtrlCreateObj ($IE, 0, 20, 499, 199) $button = GUICtrlCreateButton ("Go!", 450, 0, 40, 20) WinSetTrans($GUI, "", 140) WinSetOnTop("TEST", "", 1) GUISetState() _IENavigate ($IE, "http://www.google.com", 0) While 1 $GUI = GUIGetMsg() $msg = GUIGetMsg() Select Case $GUI = $GUI_EVENT_CLOSE Exit Case $msg = $button _IENavigate ($IE, "" & $input, 0) EndSelect WEnd Link to comment Share on other sites More sharing options...
rover Posted June 23, 2008 Share Posted June 23, 2008 (edited) you only use one call to GUIGetMsg() in the loop read help file for GUICtrlCreateInput(), you need to read the control with GUICtrlRead() you can make use of both the input control and the go button as in any browser #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> #NoTrayIcon $IE = _IECreateEmbedded() $GUI = GUICreate("TEST", 500, 200, -1,-1,($WS_EX_LAYERED)) $input = GUICtrlCreateInput ("", 0, 0, 450, 20) $IEGUI = GUICtrlCreateObj ($IE, 0, 20, 499, 199) $button = GUICtrlCreateButton ("Go!", 450, 0, 40, 20) WinSetTrans($GUI, "", 140) WinSetOnTop("TEST", "", 1) GUISetState() _IENavigate ($IE, "http://www.google.com", 0) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $button, $input ; Go button or Enter key after typing in input edit control _IENavigate ($IE, GUICtrlRead($input), 0) EndSwitch WEnd Edited June 23, 2008 by rover I see fascists... Link to comment Share on other sites More sharing options...
thelex Posted June 23, 2008 Author Share Posted June 23, 2008 (edited) Thanks a lot Last thing is, is it possible to make it so when you click "Go!" to go to the new page, it also refreshes it(when the new page has loaded), because it doesn't show up untill i refresh it :S ... Edited June 23, 2008 by thelex Link to comment Share on other sites More sharing options...
thelex Posted July 3, 2008 Author Share Posted July 3, 2008 bump. 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