Jump to content
asiawatcher

read txt file entries and open many url's

Recommended Posts

asiawatcher

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

Share this post


Link to post
Share on other sites
water

Can you please tell us why you need to process 3000 URLs?
Looks a bit suspicious.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
asiawatcher

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

Share this post


Link to post
Share on other sites
AutoBert

when your pc is ok and have no virus read in help about FileRead, ShellExecute, For...Loop and Concatenation operators.

Share this post


Link to post
Share on other sites
asiawatcher

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 by asiawatcher

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×