tomaskir Posted December 12, 2011 Share Posted December 12, 2011 (edited) Hey guys,I have a rather strange problem with the fallowing code:expandcollapse popup#include "GUIConstantsEx.au3" #include "StaticConstants.au3" #include "ButtonConstants.au3" #include "IE.au3" Global $frm_main Global $lbl_info Global $btn_cam1 Global $btn_cam2 Global $btn_cam3 Global $btn_cam4 Global $btn_cam5 Global $btn_exit Global $embedIEreff = _IECreateEmbedded() Global $embedIEframe GenerateGUI() GUILoop() Func GenerateGUI() $frm_main = GUICreate("CamControl", 440, 280) $lbl_info = GUICtrlCreateLabel("Choose:", 0, 0, 190, 30, $SS_CENTER) $btn_cam1 = GUICtrlCreateButton("1", 20, 35, 150, 35, $BS_CENTER) $btn_cam2 = GUICtrlCreateButton("2", 20, 75, 150, 35, $BS_CENTER) $btn_cam3 = GUICtrlCreateButton("3", 20, 115, 150, 35, $BS_CENTER) $btn_cam4 = GUICtrlCreateButton("4", 20, 155, 150, 35, $BS_CENTER) $btn_cam5 = GUICtrlCreateButton("5", 20, 195, 150, 35, $BS_CENTER) $btn_exit = GUICtrlCreateButton("Exit", 45, 245, 100, 25) $embedIEframe = GUICtrlCreateObj($embedIEreff, 190, 10, 240, 260) ;$embedIEframe = GUICtrlCreateObj($embedIEreff, 190, 10, 1, 1) GUICtrlSetFont($lbl_info, 14, 400, 0, "MS Reference Sans Serif") GUISetState(@SW_SHOW, $frm_main) EndFunc ;==>GenerateGUI Func GUILoop() Local $msg Local $JoyBtn While 1 = 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $btn_cam1 _IENavigate($embedIEreff, "192.168.1.107") Case $msg = $btn_cam2 _IENavigate($embedIEreff, "www.google.com") Case $msg = $btn_exit Exit EndSelect WEnd EndFunc ;==>GUILoopNow the strange thing:This all worked fine this morning. Without touching the code, the IP address now doesnt work, but google still does.This program cannot display the webpage [b] Most likely causes:[/b] [list] [*]You are not connected to the Internet. [*]The website is encountering problems. [*]There might be a typing error in the address. [/list]If I open the IP address in a normal IE window it works. Im really lost here. Using http://192.168.1.107/ in the code doesnt help. As mentioned, this all worked fine just this morning so I think that there is something wrong with the Embedded IE window.Can someone help?Thanks! Edited December 12, 2011 by tomaskir Link to comment Share on other sites More sharing options...
DeSwa Posted December 12, 2011 Share Posted December 12, 2011 change GuiLoop function Func GUILoop() Local $msg Local $JoyBtn While 1 = 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $btn_cam1 _IENavigate($embedIEreff, "http://192.168.0.75") Case $msg = $btn_cam2 _IENavigate($embedIEreff, "www.google.com") Case $msg = $btn_exit Exit EndSelect WEnd EndFunc ;==>GUILoop and try http:// +ip+ like this : _IENavigate($embedIEreff, "http://192.168.0.75") Link to comment Share on other sites More sharing options...
tomaskir Posted December 12, 2011 Author Share Posted December 12, 2011 (edited) change GuiLoop function Func GUILoop() Local $msg Local $JoyBtn While 1 = 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $btn_cam1 _IENavigate($embedIEreff, "http://192.168.0.75") Case $msg = $btn_cam2 _IENavigate($embedIEreff, "www.google.com") Case $msg = $btn_exit Exit EndSelect WEnd EndFunc ;==>GUILoop and try http:// +ip+ like this : _IENavigate($embedIEreff, "http://192.168.0.75") Didnt help, still getting "This program cannot display the webpage" in the embedded window. In normal IE the webpage works however. Edited December 12, 2011 by tomaskir Link to comment Share on other sites More sharing options...
magodiez Posted December 12, 2011 Share Posted December 12, 2011 is the computer/server using the IP 192.168.1.107 connected??? Link to comment Share on other sites More sharing options...
tomaskir Posted December 12, 2011 Author Share Posted December 12, 2011 Yes, in normal IE the webpage works without a problem. Link to comment Share on other sites More sharing options...
JohnOne Posted December 12, 2011 Share Posted December 12, 2011 If 192.168.0.75 is your local IP address, try @IPAddress1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
tomaskir Posted December 12, 2011 Author Share Posted December 12, 2011 If 192.168.0.75 is your local IP address, try @IPAddress1Its connecting to another machine on the local network, not to my machine. Link to comment Share on other sites More sharing options...
DaleHohm Posted December 12, 2011 Share Posted December 12, 2011 Not likely related to AutoIt. Suggest google'ing "This program cannot display the webpage" and you'll find lots of discussion. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble 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