CyNDeR Posted November 6, 2007 Share Posted November 6, 2007 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 More sharing options...
flyingboz Posted November 6, 2007 Share Posted November 6, 2007 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.pseudocodewhile true wait a while $html = InetGet() if $html <> $gui_html then Update GUIwendIf you're really lost, make a msgbox change first, before you tackle the gui part. If you buildyour 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 More sharing options...
CyNDeR Posted November 6, 2007 Author Share Posted November 6, 2007 Yeah, i pretty much had that part figured out, my problem is that i don't want all of the text from the site, just a certain part. I'm trying to figure out how to just get the text i need and not the full site. My scripts: Random Painter Link to comment Share on other sites More sharing options...
jvanegmond Posted November 6, 2007 Share Posted November 6, 2007 _StringBetween a combination of StringSplit, StringLeft, StringRight or StringRegExp github.com/jvanegmond Link to comment Share on other sites More sharing options...
flyingboz Posted November 7, 2007 Share Posted November 7, 2007 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 More sharing options...
DaleHohm Posted November 7, 2007 Share Posted November 7, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now