Juanola Posted February 8, 2009 Share Posted February 8, 2009 (edited) Test It please. It is the script #include <IE.au3> $o_IE = _IECreate ("http://www.selfseo.com/ip_to_country.php", 0, 1, 1, 0) $Load1 = _IELoadWait($o_IE, 0, 10000) If $Load1 = 0 Then MsgBox(0, "Error", "Cannot open " & "http://www.selfseo.com/ip_to_country.php" & ". Please make sure that you entered correct URL and check if site is online.") _IEQuit($o_IE) EndIf sleep(500) $o_form = _IEFormGetObjByName($o_IE, "search") $o_search = _IEFormElementGetObjByName($o_form, "ip") _IEFormElementSetValue($o_search, "82.193.149.51") sleep(500) _IEFormSubmit($o_form) $oSubmit = _IEGetObjByName($o_form, "submit") _IEAction ($oSubmit, "focus") ControlSend($o_IE, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}") sleep(9000) $text = WinGetText("[CLASS:Internet Explorer_Server; INSTANCE:1]", "") MsgBox(0, "Text read:", $text) _IEQuit($o_IE) How Can I read the result text: "The IP address 82.193.149.51 is assigned to Russian Federation" ??? Thank you! Edited February 8, 2009 by Juanola Link to comment Share on other sites More sharing options...
Authenticity Posted February 8, 2009 Share Posted February 8, 2009 #include <IE.au3> #include <Array.au3> Dim $aResults $o_IE = _IECreate ("http://www.selfseo.com/ip_to_country.php") $o_form = _IEFormGetObjByName($o_IE, "search") $o_search = _IEFormElementGetObjByName($o_form, "ip") $o_Input = _IEFormElementGetObjByName($o_form, "submit") _IEFormElementSetValue($o_search, "82.193.149.51") $o_Input.Click _IELoadWait($o_IE) $cTags = _IETagNameGetCollection($o_IE, "center") For $cTag In $cTags $aResults = StringRegExp($cTag.outerText, "(The IP.*)", 1) If Not @error Then ExitLoop Next _ArrayDisplay($aResults) Link to comment Share on other sites More sharing options...
Juanola Posted February 8, 2009 Author Share Posted February 8, 2009 Thank you very much!! Your script is great and your solution too!! 5 stars! 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