Jump to content

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.

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

Link to comment
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
Link to comment
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

Link to comment
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

Link to comment
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.

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...