# Pulling Text From A Web Page

## Recommended Posts

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.

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

Payment Information

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 on other sites

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

Automate input type=file (Related)

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 on other sites

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

##### Share on other sites

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

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

Automate input type=file (Related)

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

## Create an account

Register a new account

×

• Wiki

• Back

• Git