Sign in to follow this  
Followers 0
PMT96VN

[Help]How to read info in IE with this site?

11 posts in this topic

#1 ·  Posted (edited)

Hi everybody,

I'm try to code a tool read information from http://whitepages.com

Example i have list 10 address:

http://www.whitepages.com/search/Replay?facebook_count=10&lower=11&parent_search_id=73021451888822124881&search_id=73021451888822124881&search_type=findperson&twitter_count=100

Then, how program click on link each name. (I don't know name before). Exp : How i get link on div id = "result_1"

After i click on link of this div id, how i read information in class. exp :

<p class="address">

Thank everybody!

Edited by PMT96VN

Share this post


Link to post
Share on other sites



Everybody who can help me ?

Share this post


Link to post
Share on other sites

Look at the _IE* functions of the IE.au3 UDF in the help file. Try the example scripts for each of them. That will get you started.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

I was try all function in IE. But i don't know what function to get info from class.

You can guest me some function ?

Share this post


Link to post
Share on other sites

I was try all function in IE. But i don't know what function to get info from class.

You can guest me some function ?

Once you have an object reference to an element, you would use something like this:
$sClass = $oElement.className

If you need more help, post the short test script you are using to try it.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Can you help me with site on #1 ?

Share this post


Link to post
Share on other sites

Can you help me with site on #1 ?

I read that as "Can you write it for me?"

No.

This forum supports learning and using AutoIt. If you have no interest in learning AutoIt and doing it yourself, you are on the wrong forum. I would suggest you go to the Chat forum and offer to pay someone to write it for you, or try the Rent-A-Coder link in my sig.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

But i don't know how to learn

$sClass = $oElement.className

Where man ? . In Help File not talk about .className or something same it!

Share this post


Link to post
Share on other sites

Have you downloaded and installed the current version of AutoIt (3.3.2.0)?

Have you downloaded and installed the full version of SciTE4AutoIt3 (not the 'lite' version packed with AutoIt)?

Have you browsed the help file (AutoIt.chm) and run the simple tutorials there?

Have you run the examples scripts in the help file for all the _IE* functions to see their basic operation?

Have you downloaded and run the AutoIt 1-2-3 tutorial linked in my sig?

Until you answer 'yes' to all of those questions, you are not ready for this project.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Try the code below, It should give you a report of the input names and values. Then you can figure out how to control theI hope this helps. (no waranty on this work)

( and it will look funny because all the spaces have been removed from the original code)

#include <IE.au3>

$oIE = _IECreate ("http://www.whitepages.com/search/Replay?...search_type=findperson&twitter_count=100")

_IELoadWait( $oIE )

_IEFormReport( $oIE , "form reports" )

Exit

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;

;;; User Function by Jim Rumbaugh 12-2009

;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

FUNC _IEFormReport( $oSource , $cInfo )

;;;;; .......... FORM report

$oForms = _IEFormGetCollection ($oSource)

$cReport = $cInfo & @CRLF

$cReport = $cReport & "There are " & @extended & " FORMS on this page" & @CRLF

$nCount = 0

For $oForm In $oForms

$cReport = $cReport & ".............." & $oForm.name &" Form number:"& _

$nCount & " length:" & $oForm.length & "......................" & @CR

$oElements = _IEFormElementGetCollection ($oForm)

For $oElement IN $oElements

$cReport = $cReport & "element name: " & $oElement.name & _

" value:" & $oElement.value & @CR

Next

$nCount += 1

Next

MsgBox(0, "Form Report Info ", $cReport )

Return

EndFunc

Edited by jrumbaug

Share this post


Link to post
Share on other sites

Try the code below, It should give you a report of the input names and values. Then you can figure out how to control theI hope this helps. (no waranty on this work)

( and it will look funny because all the spaces have been removed from the original code)

#include <IE.au3>
$oIE = _IECreate ("http://www.whitepages.com/search/Replay?...search_type=findperson&twitter_count=100")
_IELoadWait( $oIE )
_IEFormReport( $oIE , "form reports" )

Exit


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; User Function by Jim Rumbaugh 12-2009
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

FUNC _IEFormReport( $oSource , $cInfo )
    ;;;;; .......... FORM report
    $oForms  = _IEFormGetCollection ($oSource)
    $cReport = $cInfo   & @CRLF
    $cReport = $cReport & "There are " & @extended & " FORMS on this page" & @CRLF
    $nCount  = 0
    For $oForm In $oForms
        $cReport = $cReport & ".............." & $oForm.name &"  Form number:"& _
        $nCount &   " length:" & $oForm.length & "......................" & @CR
        $oElements = _IEFormElementGetCollection ($oForm)
        For $oElement IN $oElements
            $cReport = $cReport & "element name: " & $oElement.name & _
            "       value:" & $oElement.value & @CR
        Next
        $nCount += 1
    Next
    MsgBox(0, "Form Report Info ", $cReport )
    Return
EndFunc
Use code or autoit boxes to preserve whitespace when posting.

Also, the OP was refrencing class name, not the element name. None of the stock _IE* functions return that, but your function should work just by replacing $oElement.name with $oElement.className.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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