debkol35 0 Posted June 14, 2014 (edited) Hi... #include <IE.au3> Local $oIE = _IECreate("www.google.com") _IENavigate($oIE, "http://mysite.us") after going to mysite.us, it will copy all links starts with " http://bit.ly/* " and after autoit will open all those links randomly? is it possible? I am trying but failing to make it work I have placed many bit.ly links in my site...Just want autoit to open them randomly then go back to my site, then open another bit.ly* link randomly !! Edited June 14, 2014 by debkol35 Share this post Link to post Share on other sites
water 2,359 Posted June 14, 2014 Can you please tells us what you try to achieve by randomly opening links? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
Jos 2,164 Posted June 14, 2014 (edited) Hi... #include <IE.au3> Local $oIE = _IECreate("www.google.com") _IENavigate($oIE, "http://mysite.us") after going to mysite.us, it will copy all links starts with " http://bit.ly/* " and after autoit will open all those links randomly? is it possible? I am trying but failing to make it work I have placed many bit.ly links in my site...Just want autoit to open them randomly then go back to my site, then open another bit.ly* link randomly !! How is this different than your >other thread? Edited June 14, 2014 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
debkol35 0 Posted June 14, 2014 (edited) Can you please tells us what you try to achieve by randomly opening links? umm...I want to upload flash games on my site..and put those links in one place...later autoit will open each game links from that place then wait... and then go back to that place and will open different flash game link How is this different than your >other thread? umm..in that topic, links are limited to numbers, like link1, link2 but...I want to remove numbers... for example, I will upload more links in future, and autoit will open them too....I dont want to edit script everytime I upload links ----------------------------------------- I made it this far... #include <IE.au3> Local $oIE = _IECreate("www.google.com") _IENavigate($oIE, "http://mywebsite.us/") _IELinkGetCollection($oIE) Local $oLinks = _IELinkGetCollection($oIE) Local $iNumLinks = @extended MsgBox(0, "Link Info", $iNumLinks & " links found") Last thing is happening, its collecting all 25 links. Now I need to open them randomly.... Please if someone helps me...I am trying hard but.. ----------------------------------------------------- Ok I tried this method...but looks like its only opening the last link of the page every time ...I set 10 times loops...hoped it will open 10 different links in 10 times but its always opening the last link.. ( where do I miss ? #include <IE.au3> Local $oIE = _IECreate("www.google.com") Local $i = 0 Do $i = $i + 1 _IENavigate($oIE, "http://mypage.us/") $oElements = _IETagNameGetCollection($oIE,"A") $text = "" For $oElement In $oElements StringRegExp($oElement.innerText, "Link") If not @error then $text = $oElement.innerText Next _IELinkClickByText($oIE,$text) sleep(1000) Until $i = 10 :- posting the solution if anyone needs in future source:- Local $oLinks = _IELinkGetCollection($oIE) Local $iNumLinks = @extended _IELinkClickByIndex($oIE, Random(0, $iNumLinks)) Edited June 14, 2014 by debkol35 Share this post Link to post Share on other sites