6105 Posted March 10, 2012 Share Posted March 10, 2012 (edited) Hi there, to read page and go next i always use this function: #include <Array.au3> #include <IE.au3> $oIE = _IECreate('http://autoitscript.com/forum') $sHTML = _IEBodyReadHTML($oIE) ; read Body $aFile = @TempDir&'au3test.tmp' ; create File $wFile = FileWrite($aFile,$sHTML) ; write Body to File $oFile = FileOpen($aFile, 0) ; open File and then make some function to use site information like: While 1 Local $aRead = FileReadLine($oFile) If @error then ExitLoop $aSearch = StringInStr($aRead,'<LI><SPAN') If $aSearch > 0 Then $aArray = _StringBetween($aRead, 'href="', '"') _ArrayDisplay($aArray) EndIf WEnd But this method i think is too slow, can someone give me some tips how i can make this function more fast? Thanks if advance for any tips.. EDIT: Fix code Edited March 10, 2012 by 6105 [center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center] Link to comment Share on other sites More sharing options...
DW1 Posted March 10, 2012 Share Posted March 10, 2012 (edited) What are you trying to accomplish exactly? Be more clear with your requests, I've noticed this trend in your posts. Not trying to be rude, and I would like to help, but you can help yourself with better posting practices. Define the issue and what you want as the outcome as a minimum.EDIT:For instance, what do you mean by this?to read page and go next i always use this function: Edited March 10, 2012 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
6105 Posted March 10, 2012 Author Share Posted March 10, 2012 Dear danwill, i think here is my trouble, i have take a look in Help file and found all what i need _IELinkGetCollection, _IELinkClickByText and many. Sorry for my question.. that is true spam [center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center] Link to comment Share on other sites More sharing options...
6105 Posted March 10, 2012 Author Share Posted March 10, 2012 (edited) Well, i have remembered my question, question is how to simplify my code..always i write body or text to file, have here some possibility to make it in memory?i have _IEBodyReadText($oIE) or _IEBodyReadHTML($oIE)how i can read each line without writing it to file?Thank you and sorry for misunderstandings.EDIT: with bold Edited March 10, 2012 by 6105 [center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center] Link to comment Share on other sites More sharing options...
DaleHohm Posted March 10, 2012 Share Posted March 10, 2012 Check out the example for _IELinkGetCollection() Dale 6105 1 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...
6105 Posted March 10, 2012 Author Share Posted March 10, 2012 (edited) Thank you Dale, by the way, i have resolved it using StringRegExp, now code is in 2 times faster)) EDIT: no more write,read,stringbetween. Just StringRegExp Edited March 10, 2012 by 6105 [center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center] Link to comment Share on other sites More sharing options...
somdcomputerguy Posted March 10, 2012 Share Posted March 10, 2012 always i write body or text to file, have here some possibility to make it in memory?It's already 'made' in memory. The variable is made. Use it as you see fit. 6105 1 - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. 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