Jump to content
Sign in to follow this  
bqp2

Read from file help

Recommended Posts

#include <Process.au3>

#include <File.au3>

$test = 63901

$handle = FileOpen("C:\Zip.txt", 1)

$zip = FileReadLine($handle, Random(1, 42021, 1))

FileClose($handle)

MsgBox(4096, "Test", "zip Code is" & $zip , 10)

why is this not working, if i use $test it works so its obviously not reading the file

Share this post


Link to post
Share on other sites

And that your text file really does have 42000 lines in it.

lol yes its a zip code reader and i got them all,

i set $test to 63901 and when i use MsgBox(4096, "Test", "zip Code is" & $test , 10) it says

zip Code is63901

but when i use the $zip it just returns

zip Code is

what would be the proper code to get it to show the zip on that random line?

edit nevermind $handle = FileOpen("C:\Zip.txt", 1) the 1 should be a zero

Edited by bqp2

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...