ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Select Random Line from Text File

(1/2) > >>

Verathis:
I'm looking for a program that selects a random line from a text file of my choice. There was something similar done here. But I don't want the thing to increase the chance with numbers. Also, my list has 3 spaces in front of each entry due to the program I used to generate the list. :-[ Not sure if that's needed or not, since it would just be displaying a random line.

It seems simple in nature, but I'm horrible with actual programming languages, so if someone could write this up for me, I'd be very grateful. Or if it's already been done and I'm missing it, just toss me a link. I'd prefer it be an exe, but if there is a website that will eat my txt file and give me a random entry from it, that would work too!

mhb:
Hi Verathis,

just had a couple of free minutes available right now.... so here is a very simple solution:

In the AHK script you can define a default text file if you want, otherwise just call the EXE with the textfile as an argument

--- ---RandomLine_simple.exe MyQuotes.txt

I hope it helps...

Marc

kartal:
I hope that this kind of software is not used for "spamming"

jgpaiva:
Verathis: With mhb's solution, you can also just drop the .txt file on the .exe file ;)

mhb:
Hi kartal,

I don't think this program is going to support spamming, BUT I wouldn't be too surprised if suddenly somebody new to this forum suggests a website or tool "which is really good for this purpose"  ;)

Greetings,
Marc

Navigation

[0] Message Index

[#] Next page

Go to full version