asiawatcher Posted March 14, 2016 Share Posted March 14, 2016 i got a huge txt list like this A117 A127 A137 A157 A177 A226 A227 A237 A256 A257 A401 A411 i need to make a script that will read all those 3000 entries (read the file) and in groups of 20 to open 20 url's like: http://mysite.com?id=A117 http://mysite.com?id=A127 ETC ETC each time in tabs or new windows i dont mind (preferably tabs) So for the first batch it will open 20 tabs for the first 20 entries then next 20 next 20 etc.. and it will pause in between and ask me to continue it needs to be compatible with chrome or ie i don't mind really i have searched all the forums but didn't find anything similar cheers Link to comment Share on other sites More sharing options...
water Posted March 14, 2016 Share Posted March 14, 2016 Can you please tell us why you need to process 3000 URLs? Looks a bit suspicious. 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...
asiawatcher Posted March 14, 2016 Author Share Posted March 14, 2016 hi there purely for testing purposes to see if my script outputs the correct response for each variable, i don't want to flood it that's why i say groups of 20 tabs or so at a time cheers Link to comment Share on other sites More sharing options...
AutoBert Posted March 14, 2016 Share Posted March 14, 2016 when your pc is ok and have no virus read in help about FileRead, ShellExecute, For...Loop and Concatenation operators. Link to comment Share on other sites More sharing options...
asiawatcher Posted March 14, 2016 Author Share Posted March 14, 2016 (edited) i know how those work with thew exception that i dont know how to open groups of 20 at a time out of 3000 entries and pause after a bunch of 20 then continue on demand for the next 20 etc ~:/ $many = FileOpen("strings.txt", $FO_READ) $many_r= FileRead($many) $aArray = StringSplit($many_r, @crlf, $STR_ENTIRESPLIT) ; Pass the variable to StringSplit and using the delimiter "\n". For $i = 1 To $aArray[0] ; Loop through the array returned by StringSplit to display the individual values. ShellExecute("chrome.exe", "https://www.mysite/?id="&$aArray[$i],"","") Next FileClose($many) this will open 3000 tabs !!! no way Edited March 14, 2016 by asiawatcher 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