debkol35 Posted June 14, 2014 Share 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 Link to comment Share on other sites More sharing options...
water Posted June 14, 2014 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Developers Jos Posted June 14, 2014 Developers Share 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. Link to comment Share on other sites More sharing options...
Solution debkol35 Posted June 14, 2014 Author Solution Share 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 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