HenryA Posted January 3, 2008 Share Posted January 3, 2008 I wish to save a Web Page to a Text file. I think I can use _INetGetSource since I have the URL but which function will take the output of _INetGetSource and store it in a Text File? Thank You HenryA Link to comment Share on other sites More sharing options...
Blue_Drache Posted January 3, 2008 Share Posted January 3, 2008 InetGetSource does a very good job at that, actually. Just dump it into a $variable and then FileWrite() it and you've got the source. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
GEOSoft Posted January 3, 2008 Share Posted January 3, 2008 I wish to save a Web Page to a Text file.I think I can use _INetGetSource since I have the URL but which function will take the output of _INetGetSource and store it in a Text File?Thank YouHenryAIf you use the IE.au3 UDF then you will be able to get it with_IEBodyReadTextThe IE.au3 functions can be found in the User Defined Functions area of the help file. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Blue_Drache Posted January 3, 2008 Share Posted January 3, 2008 Even better. Use the IE.au3 functions. Makes web manipulation a snore. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
HenryA Posted January 4, 2008 Author Share Posted January 4, 2008 Even better. Use the IE.au3 functions. Makes web manipulation a snore.Thank you for your help. I am almost there. This is the program I have. The PDF file that is saved ("test.pdf") looks good but is not quite right.Any ideas?Thank you=============================#include <INet.au3>$file = FileOpen("test.pdf", 1); Check if file opened for writing OKIf $file = -1 Then MsgBox(0, "Error", "Unable to open file.") ExitEndIfFileWrite($file, _INetGetSource ( 'www.w3.org/TR/2000/REC-xml-20001006.pdf' ))FileClose($file)============================= Link to comment Share on other sites More sharing options...
DaleHohm Posted January 4, 2008 Share Posted January 4, 2008 Since what you desire is a file instead of webpage source, you need this: InetGet("http://www.w3.org/TR/2000/REC-xml-20001006.pdf", "C:\foo.pdf") 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...
HenryA Posted January 4, 2008 Author Share Posted January 4, 2008 Since what you desire is a file instead of webpage source, you need this:InetGet("http://www.w3.org/TR/2000/REC-xml-20001006.pdf", "C:\foo.pdf")DaleDale, Thank you very much. You solved my problem 100%Everything works fine now.Many thanks,HenryA 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