HR78 Posted September 7, 2011 Share Posted September 7, 2011 Hi. I have this script: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> _IEErrorHandlerRegister () Dim $oIE = _IECreateEmbedded () ;Dim $oIE2 = _IECreateEmbedded () Opt("GUIResizeMode", 1) Opt("GUIOnEventMode", 1) ; OnEvent mode Dim $gui = GUICreate("resizable", 1000, 600,-1,-1,$WS_OVERLAPPEDWINDOW) $Button1 = GUICtrlCreateButton("Button1", 900, 60, 90, 33) $Button2 = GUICtrlCreateButton("Button2", 900, 100, 90, 33) Dim $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0,900,600) _IENavigate ($oIE, "http://google.com") ;Dim $GUIActiveX2 = GUICtrlCreateObj($oIE2, 0, 300,800,250) ;_IENavigate ($oIE2, "http://images.google.com") GUISetState (@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _IENavigate ($oIE, "www.autoitscript.com") Case $Button2 _IENavigate ($oIE, "http://www.autoitscript.com/forum/") EndSwitch WEnd How make Button1 and Button2 navigate "_IENavigate" to another sites?? Thanks. [URL=http://www.4shared.com/file/CMpeMOgr/KMSnano_100_Final_AIO_Activato.html]KMSnano 10.0 Final AIO Activator for Windows 7, 8 and Office 2010, 2013.exe[/URL] [URL=http://www.4shared.com/file/ODqqYSju/Windows_7_Loader_v208__x86-x64.html]Windows 7 Loader v2.0.8 (x86-x64) by Daz.exe[/URL] [URL=http://www.4shared.com/file/Jc8lQNic/Windows_7_Manager_v426__x32-x6.html]Windows 7 Manager v4.2.6 (x32-x64).exe[/URL] [URL=http://www.4shared.com/file/WMdwBjBE/Windows_8_Manager_v114.html]Windows 8 Manager v1.1.4.exe[/URL] Link to comment Share on other sites More sharing options...
Herb191 Posted September 7, 2011 Share Posted September 7, 2011 GUIOnEventMode set to 1 is keeping it from working try this: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> _IEErrorHandlerRegister() Dim $oIE = _IECreateEmbedded() ;Dim $oIE2 = _IECreateEmbedded () Opt("GUIResizeMode", 1) ;Opt("GUIOnEventMode", 1) ; OnEvent mode Dim $gui = GUICreate("resizable", 1000, 600, -1, -1, $WS_OVERLAPPEDWINDOW) $Button1 = GUICtrlCreateButton("Button1", 900, 60, 90, 33) $Button2 = GUICtrlCreateButton("Button2", 900, 100, 90, 33) Dim $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 900, 600) _IENavigate($oIE, "http://google.com") ;Dim $GUIActiveX2 = GUICtrlCreateObj($oIE2, 0, 300,800,250) ;_IENavigate ($oIE2, "http://images.google.com") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _IENavigate($oIE, "www.autoitscript.com") Case $Button2 _IENavigate($oIE, "http://www.autoitscript.com/forum/") EndSwitch WEnd Link to comment Share on other sites More sharing options...
HR78 Posted September 8, 2011 Author Share Posted September 8, 2011 GUIOnEventMode set to 1 is keeping it from working try this: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> _IEErrorHandlerRegister() Dim $oIE = _IECreateEmbedded() ;Dim $oIE2 = _IECreateEmbedded () Opt("GUIResizeMode", 1) ;Opt("GUIOnEventMode", 1) ; OnEvent mode Dim $gui = GUICreate("resizable", 1000, 600, -1, -1, $WS_OVERLAPPEDWINDOW) $Button1 = GUICtrlCreateButton("Button1", 900, 60, 90, 33) $Button2 = GUICtrlCreateButton("Button2", 900, 100, 90, 33) Dim $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 900, 600) _IENavigate($oIE, "http://google.com") ;Dim $GUIActiveX2 = GUICtrlCreateObj($oIE2, 0, 300,800,250) ;_IENavigate ($oIE2, "http://images.google.com") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _IENavigate($oIE, "www.autoitscript.com") Case $Button2 _IENavigate($oIE, "http://www.autoitscript.com/forum/") EndSwitch WEnd Thanks Herb191 work perfect [URL=http://www.4shared.com/file/CMpeMOgr/KMSnano_100_Final_AIO_Activato.html]KMSnano 10.0 Final AIO Activator for Windows 7, 8 and Office 2010, 2013.exe[/URL] [URL=http://www.4shared.com/file/ODqqYSju/Windows_7_Loader_v208__x86-x64.html]Windows 7 Loader v2.0.8 (x86-x64) by Daz.exe[/URL] [URL=http://www.4shared.com/file/Jc8lQNic/Windows_7_Manager_v426__x32-x6.html]Windows 7 Manager v4.2.6 (x32-x64).exe[/URL] [URL=http://www.4shared.com/file/WMdwBjBE/Windows_8_Manager_v114.html]Windows 8 Manager v1.1.4.exe[/URL] 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