Sign in to follow this  
Followers 0
NSearch

Pulling Text From A Web Page

7 posts in this topic

I am trying to pull information for a web page, and store it in a text file.

The program will loop through a series of claim numbers, entering in the information, and retrieving the related information.

Any advice would be great.

I am trying to retrieve information in a table that is setup like this:

Payment Information

Payment Address: XXXXXXXXXXXXXXXX

3820 XXXXX DR

XXXXXXX, XX, 43204

Payment Type: XXXXXX

Paid Amount: XXX.XX USD

Method: XXXXXX

Payment Date: XX/XX/XXX

Check Number: XXXXXXXX

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Well I would use a component, could be embeded into an intuition of some kind

$URL='http://www.AutoItScript.com' // could be any URL but I don't know about protection tags set 'on'

$httpObj = ObjCreate("winhttp.winhttprequest.5.1")
$httpObj.open("GET",$URL)
$httpObj.send()

$HTMLSource = $httpObj.Responsetext
ConsoleWrite($HTMLSource)
$httpObj = 0 // free the object

You just have to do the search in the html code your self in some manner like with stringinstr(....

hope this can help

kjactive :)

Edited by kjactive

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

First you need the IE.au3 UDF's

Then I'd suggest reading the Docs

Then you can use _IETableWriteToArray

Edit: Adding missing link

Edited by big_daddy

Share this post


Link to post
Share on other sites

I am getting the following error when using $array = _IETableWriteToArray($oIE)

/autoit3dir "C:\Program Files\AutoIt3\beta" /UserParams

>Running AU3Check params: from:C:\Program Files\AutoIt3\SciTe\au3check\

+>AU3Check ended.rc:0

>Running:(3.1.1.122):C:\Program Files\AutoIt3\beta\autoit3.exe "C:\XXXXXXXXXXXX.au3"

C:\Program Files\AutoIt3\beta\Include\IE.au3 (1091) : ==> The requested action with this object has failed.:

$trs = $o_object.rows

$trs = $o_object.rows^ ERROR

+>AutoIT3.exe ended.rc:0

Share this post


Link to post
Share on other sites

I am getting the following error when using $array = _IETableWriteToArray($oIE)

/autoit3dir "C:\Program Files\AutoIt3\beta" /UserParams

>Running AU3Check params: from:C:\Program Files\AutoIt3\SciTe\au3check\

+>AU3Check ended.rc:0

>Running:(3.1.1.122):C:\Program Files\AutoIt3\beta\autoit3.exe "C:\XXXXXXXXXXXX.au3"

C:\Program Files\AutoIt3\beta\Include\IE.au3 (1091) : ==> The requested action with this object has failed.:

$trs = $o_object.rows

$trs = $o_object.rows^ ERROR

+>AutoIT3.exe ended.rc:0

You must get a reference to the table and pass that into the _IETableWriteToArray(), not the browser object ($oIE). The docs that big_daddy pointed you to will give you detail on the expected parameters.

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

Thank you Dale. It has been awhile since I used IE.au3, and I am a little rusty.

I appreciate your help.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Thank you Dale. It has been awhile since I used IE.au3, and I am a little rusty.

I appreciate your help.

No problem... a few minutes with big_daddy's docs... a half a dozen lines of code... I think you'll be pleased with the results.

Dale

P.S. the next beta baselevel will return an error status telling you invalid object type instead of the abrupt, cryptic error you receive now.

Edited by DaleHohm

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

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