Jump to content

how do i read a random line of text from a file?


Recommended Posts

Open file with notepad++.

See how much lines it contains.

For example, there is 888 lines.

Then

$handle = FileOpen("C:\example.txt")
$info = FileReadLine($handle, Random(1,888,1))
MsgBox (0, "Random line:", $info)

Edited by electrico
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...