brodie28 Posted July 18, 2006 Share Posted July 18, 2006 I think I remember seeing a function that edited an internet page... Obviously not on the server, but edited the page stored in temp memory. Using this you could change the name of links and etc. By changing the site saved in temp memory. Link to comment Share on other sites More sharing options...
jvanegmond Posted July 18, 2006 Share Posted July 18, 2006 InetGet() is the function to download files (.html/.txt/.jpg/.mpg anything) from the web. github.com/jvanegmond Link to comment Share on other sites More sharing options...
brodie28 Posted July 18, 2006 Author Share Posted July 18, 2006 What I am trying to do is have the script navigate to a page, and when the page is loaded, have it change things on the loaded page by editing it client side. So I can change links and such on a web page client side. Link to comment Share on other sites More sharing options...
DaleHohm Posted July 18, 2006 Share Posted July 18, 2006 I think I remember seeing a function that edited an internet page... Obviously not on the server, but edited the page stored in temp memory.Using this you could change the name of links and etc. By changing the site saved in temp memory.IE.au3 (now part of the standard UDF functions in the latest betas) gives you _IEBodyReadHTML and _IEBodyWriteHTML that gives you one way to do this. See the helpfile under User Defined Functions, IE Management.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...
DaleHohm Posted July 18, 2006 Share Posted July 18, 2006 What I am trying to do is have the script navigate to a page, and when the page is loaded, have it change things on the loaded page by editing it client side.So I can change links and such on a web page client side.Right, that is what the functions I referenced do. Take a look at the examples in the helpfile.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...
brodie28 Posted July 18, 2006 Author Share Posted July 18, 2006 Thanks alot. It looks like there is an example that does exactly what I need. IE really is a great UDF. Link to comment Share on other sites More sharing options...
brodie28 Posted July 18, 2006 Author Share Posted July 18, 2006 Well I tried the example and it works great... The problem is though, when I tried the exact same script with some different values for search and replace on a different site, it didn't work. This is one I tried on google... #include <IE.au3> $oIE = _IECreate() _IENavigate($oIE, "www.google.com") $body = _IEBodyReadHTML($oIE) If StringInStr($body, "Search") Then MsgBox(0, "Success", "The string was found") $newbody = StringReplace($body, "automation", "Pwnt") _IEBodyWriteHTML($oIE, $newbody) Else MsgBox(0, "Fail", "The string was NOT found") EndIf Exit Link to comment Share on other sites More sharing options...
brodie28 Posted July 18, 2006 Author Share Posted July 18, 2006 Turns out I am in idiot and forgot to change something. Sorry. Thanks again. 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