Jump to content
Sign in to follow this  
lopolop

getting .txt contents

Recommended Posts

lopolop

is there a way to open a .txt file and like take whats in it(not copying) and set it to a variable that could be used for a message

the .txt file may have like 20kb of info....


Share this post


Link to post
Share on other sites
SmOke_N

Have you looked at FileRead() and _FileReadToArray() in the help file?

Also, this >> Answer to most questions << should help in most of the questions you ask.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
lopolop

i'm not a retard.... i use the help 24/7 but the fileread u need a count right.. what if i dont know the count like i want everything


Share this post


Link to post
Share on other sites
SmOke_N

Last I checked, count was [optional].


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
PartyPooper

Use _FileCountLines (need beta) to get the number of lines and give you the count.

Share this post


Link to post
Share on other sites
seandisanti

i'm not a retard.... i use the help 24/7 but the fileread u need a count right.. what if i dont know the count like i want everything

one thing that i use alot when i want to do what you're wanting to do is:

$Text  = FileRead("C:\text.txt",FileGetSize("C:\text.txt"))

that reads the entire file to a variable that you can then display or manipulate at your discretion


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.