aariginal Posted February 27, 2013 Share Posted February 27, 2013 Hello,I have a line of code including _IELinkClickByText that i would like to continuously loop, so if any other link would be posted with these key words the line of code would be able to open that link until i stop the code itself, i have tried While 1WEndafter my line of code to continue the loop but it seems to not want to click any of the links after the code runs for the first time, is there anything im missing for the line of code to constantly repeat? Link to comment Share on other sites More sharing options...
Vishal85 Posted February 27, 2013 Share Posted February 27, 2013 I dont really understand your question....Can you elaborate so i can help you better.....If you are looking for a condition in the loop you can use a If statement. Link to comment Share on other sites More sharing options...
aariginal Posted February 27, 2013 Author Share Posted February 27, 2013 Okay well i got it to loop constantly, but now im running into an issue of getting duplicate websites during the loop, how can i adjust that? Link to comment Share on other sites More sharing options...
jdelaney Posted February 27, 2013 Share Posted February 27, 2013 (edited) You are going to need to post your script, or explain this much better. Preferred method: both. Edited February 27, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
jdelaney Posted February 28, 2013 Share Posted February 28, 2013 (edited) Here is an example of collecting links, and verifying they are new, before performing an action (the ConsoleWrite) #include <Array.au3> #include <IE.au3> $oIE = _IECreate("http://www.autoitscript.com/forum/forum/2-general-help-and-support/") Local $aLinks[1] While IsObj($oIE) _IELoadWait($oIE) $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks If _IEPropertyGet ($oIE, "readystate") <> 4 Then ExitLoop $sLink = $oLink.href If _ArraySearch ($aLinks, $sLink) < 0 Then ReDim $aLinks[UBound($aLinks)+1] $aLinks[UBound($aLinks)-1] = $sLink ConsoleWrite($sLink & @CRLF) EndIf Next ConsoleWrite (UBound($aLinks) & @CRLF) Sleep(1000) WEnd Just do some navigations, and only the new links will be outputed to the console, not dupes Edited February 28, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
aariginal Posted February 28, 2013 Author Share Posted February 28, 2013 that makes a lot more sense, thank you very much! Link to comment Share on other sites More sharing options...
jdelaney Posted February 28, 2013 Share Posted February 28, 2013 It's possible, depedning the length of the run, that the array will become too large...look into _ArrayPush if that becomes the case...then you don't need a growing array, but a fixed one, where the oldest link is pushed out by each new one. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
aariginal Posted February 28, 2013 Author Share Posted February 28, 2013 The only question i have about the array is These links that i would want that script to automatically click into i have no idea which addresses they will be, because its different for each link that they post. Would there be another option other then an array? I don't want to store any of the websites in the arrays, i would just like for the program to click the newer links that would be coming up in real time. 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