Jump to content

Web Page Launch to an IP Address


 Share

Recommended Posts

I am launching a web page link. If the page address is avaliable the script runs successfully. If I cancel the web page while it's loading my script hangs. This only happens when I am using an IP address in the url.

This works:

$oIE = _IECreate()
    _IENavigate($oIE, "http://www.google.com")
    If @error Then
        MsgBox(0, "Error", "Unable to load page",4)

This works (If IIS is installed):

$oIE = _IECreate()
    _IENavigate($oIE, "http://127.1.1.1")
    If @error Then
        MsgBox(0, "Error", "Unable to load page",4)

This doesn't:

$oIE = _IECreate()
    _IENavigate($oIE, "http://192.168.1.1")
    If @error Then
        MsgBox(0, "Error", "Unable to load page",4)

The 127.x.x.x are considerd loopback addresses but work if IIS is installed on the computer running the script. Is there a way to detect the page was canceled and continue with the script.

Me

Link to comment
Share on other sites

Please be more explicit about "hangs". What happens specifically? If your script really does stop executing at some point, figure out exactly what line of code... suggest you use SciTe debug mode (see my sig).

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

My script uses OnEventMode. If I the launch the browser from my script:

$oIE = _IECreate()
    _IENavigate($oIE, "http://www.google.com")
    If @error Then
        MsgBox(0, "Error", "Unable to load page",4)

and then manually close the IE browser my script still runs but I am unable to continue. Can't press any buttons doesn't respond to keyboard input (except a HotKey exit). Buttons don't work and I close the script. I think it's waiting for a result from the page launch. How do I capture the IE paged was closed before it timed out?

CC

Edited by IvanCodin
Link to comment
Share on other sites

I believe it could be more or less related to this. I explain how to work around in the case of Inet* functions, but I'm clueless for _IE*.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

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...