thenewkid Posted December 19, 2006 Posted December 19, 2006 Hi how can i make my script go to a websie but not showing a page to the user and copying every think on it and paseding it in notepad but not sholwing any of this to the user intill thay opan the notpad up some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with
mikehunt114 Posted December 19, 2006 Posted December 19, 2006 Have you looked at Dale's IE library included in the latest release? It can do exactly what you wish...specifically look at the optional parameters in _IECreate. IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Uten Posted December 19, 2006 Posted December 19, 2006 If you only want to extract some data from the page and not show anything then take a look at INetGet* and _INetGet* in the help file. Extracting is done with StringRegExp or one or the other String* functions. The _IE udf is superbe if you want to do more advanced stuff.. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
Moderators big_daddy Posted December 19, 2006 Moderators Posted December 19, 2006 This should get you going in the right direction. #include <IE.au3> $sURL = "www.google.com" $oIE = _IECreate($sURL, 0, 0) $sText = _IEBodyReadText($oIE) Run("notepad.exe", "", @SW_HIDE) WinWait("Untitled - Notepad") ControlSend("Untitled - Notepad", "", "Edit1", $sText) WinSetState("Untitled - Notepad", "", @SW_SHOW) _IEQuit($oIE)
thenewkid Posted December 20, 2006 Author Posted December 20, 2006 (edited) I tryed that and it only retruned 0 to the notepad but theres a lot more lines on the site #include <IE.au3> $sURL = "www.SupernovaBots.com" $oIE = _IECreate($sURL, 0, 0) $sText = _IEBodyReadText($oIE) Run("notepad.exe", "", @SW_HIDE) WinWait("Untitled - Notepad") ControlSend("Untitled - Notepad", "", "Edit1", $sText) WinSetState("Untitled - Notepad", "", @SW_SHOW) _IEQuit($oIE) Edited December 20, 2006 by thenewkid some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with
DaleHohm Posted December 20, 2006 Posted December 20, 2006 View Source on the site reveals: <HTML> <HEAD></HEAD> <FRAMESET ROWS='5000,*' FRAMEBORDER='no' BORDER='0'> <FRAME SRC='http://www.SupernovaBots.com/BotPrices.txt'> <FRAME> </FRAMESET> </HTML> Please read about _IEFrameGetCollection. This should get you going with the IE piece: #include <IE.au3> $sURL = "www.SupernovaBots.com" $oIE = _IECreate($sURL) $oFrame = _IEFrameGetCollection ($oIE, 0) $sText = _IEBodyReadText($oFrame) ConsoleWrite($sText) 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
thenewkid Posted December 20, 2006 Author Posted December 20, 2006 doing that shows the web site i had it running for 5 min and its not doing anythink just sucking up all my cpu some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with
DaleHohm Posted December 20, 2006 Posted December 20, 2006 I didn't test the notepad interaction, but the code I posted above should work fine. You may need to do more troubleshooting with the notepad interaction. 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
Thatsgreat2345 Posted December 20, 2006 Posted December 20, 2006 lil faster controlsettext #include <IE.au3> $sURL = "www.SupernovaBots.com" $oIE = _IECreate($sURL) $oFrame = _IEFrameGetCollection ($oIE, 0) $sText = _IEBodyReadText($oFrame) ConsoleWrite($sText) Run("notepad.exe") WinWait("Untitled - Notepad") ControlSetText("Untitled - Notepad", "", "Edit1", $sText) _IEQuit($oIE)
thenewkid Posted December 21, 2006 Author Posted December 21, 2006 thanks it worked but can it be done with out showing the webpage? some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with
Thatsgreat2345 Posted December 21, 2006 Posted December 21, 2006 set the Icreate paramaters after it to ,0,0
thenewkid Posted December 21, 2006 Author Posted December 21, 2006 Thank You some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with
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