Jump to content

Website parsing.


CyNDeR
 Share

Recommended Posts

I'm trying to edit a script i already have to embed text from a webpage and display it in the GUI, and as the text on the website changes, so does the text on the GUI. How would i go about parsing the text and embedding like that. An example would be great. <_< Thanks in advance.

My scripts: Random Painter

Link to comment
Share on other sites

I'm trying to edit a script i already have to embed text from a webpage and display it in the GUI, and as the text on the website changes, so does the text on the GUI. How would i go about parsing the text and embedding like that. An example would be great. <_< Thanks in advance.

pseudocode

while true

wait a while

$html = InetGet()

if $html <> $gui_html then Update GUI

wend

If you're really lost, make a msgbox change first, before you tackle the gui part. If you build

your site read as a UDF, you'll have made a generally useful tool.

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
Share on other sites

Generic answer -- parse the text....

Depending on the complexity of the site, you may prefer to use Dale's IE.au3 functions to control an invisible browser / examine a given web page-- or even generate a gui that is just a window on a portion of the web page itself, using IE for the rendering.... search "pandoramini" for an example of that approach.

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
Share on other sites

There are some examples of this in the helpfile for IE.au3 -- using the DOM to find the element containing the text you want and then extracting it. _IEGetObjByName example profides a simple one. If your data is in a table, see _IETableWriteToArray

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

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