Jump to content

read txt file entries and open many url's


Recommended Posts

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

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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...