Sign in to follow this  
Followers 0
DarkDragonII

Reading a web page

4 posts in this topic

Hello All,

I'm trying to do the following:

Read a number on a web page.

Store that number in a file.

I know how to store data into a file. But don't know how to "Read" an area on a web page.

Many thanks

Ben

Share this post


Link to post
Share on other sites



Hi!

You could search for a OCR script or write one yourself (difficult way).

Or you could save the source of the webpage (search for INetGetSource or sth. like that or the InternetExplorerAutomation UDF) and parse it to get your number.

Good luck, peethebee


vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Share this post


Link to post
Share on other sites

You can give the window focus, send ctrl-a, ctrl-c to it to copy its conents to the clipboard, use ClipGet to read the information and parse with with some of AutoIt's string functions, then look at AutoIt's File, Firectory and Disk functions in the helpfile to see how to write it out.

Using the beta version, you can use COM and the IE Automation UDF (see my sig), but this may be overkill for what you want.

Try some things, post some code with your progress and you'll likely get lots of help.

Dale

Hello All,

I'm trying to do the following:

Read a number on a web page.

Store that number in a file.

I know how to store data into a file. But don't know how to "Read" an area on a web page.

Many thanks

Ben


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

You can give the window focus, send ctrl-a, ctrl-c to it to copy its conents to the clipboard, use ClipGet to read the information and parse with with some of AutoIt's string functions, then look at AutoIt's File, Firectory and Disk functions in the helpfile to see how to write it out.

Using the beta version, you can use COM and the IE Automation UDF (see my sig), but this may be overkill for what you want.

Try some things, post some code with your progress and you'll likely get lots of help.

Dale

Many thanks for the help. In the end I cheated. Got Focus, send ALT+F, s, changed to text and then read the file ;)

Regards

Ben

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