Sign in to follow this  
Followers 0
ghareeb

catch html code from 2nd IE page

4 posts in this topic

i have code that automatically open page and write some info then submit button the result open in different page

my question is how can i collect data from 2nd page that result when i submit data

here is some example

this code open google write data then bring out the result

Const $URL = "http://google.com"
     $ObjIE=ObjCreate("InternetExplorer.Application")


        With $ObjIE
         .Visible = 1
         .Navigate($URL)
            Do
                Sleep(50)
             Until .ReadyState = 4
        EndWith

        With $ObjIE.document.forms(0)

         .q.value = "autoit"


          .submit.click()
         
    
        EndWith

how can i read 1st search result for example???


Are you read anything about islamok.... to know about realy Islamhttp://www.islam-guide.com click here====>Islam: Misunderstood throughout the World

Share this post


Link to post
Share on other sites



Depends on what data you are trying to return, but look at the examples in the helpfile for some of these functions:

_IECreate, _IEBodyReadHTML, _IEFormGetObjByName, _IEFormElementGetObjByName, _IEFormElementSetValue

The sources for all of these functions are in the IE.au3 UDF, so if you prefer to use COM directly you can study them and learn from what they do. You may find that the UDF simplifies what you are wanting to do however.

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

thanks Dale

i know IE function , but my main problem is how can i catch the new (result) page

Using _IENavigate() you should still be able to have the object to use _IEBodyReadHTML()... if it's a new IE version then look at _IEAttach().

Edit:

I see it uses frames, so you'll need to play with the _IEFrame* functions.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
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
Sign in to follow this  
Followers 0