Jump to content
Sign in to follow this  
pcjunki

first time array help

Recommended Posts

pcjunki

i have created a gui that executes "tasks" from GUICtrlSetData

i type in the pc name, which sets it from GUICtrlCreateInput

instead of typing the computer name (which sets the data)

can i have it read from a text file? which contains all the computer names?

i haven't built an arrary yet, i kinda understand the theory

but i'm ready to step up my game in coding

any examples would be great to start off with.

like...read a txt file (pclist.txt) and execute a command (command.txt) which could be like ...notepad or excel

thanks

:)

post-65063-0-67681400-1352134591_thumb.j

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, pcjunki. To read a text file into an array, you would use _FileReadToArray. Something like this should give you an idea:

#include <File.au3>
#include <Array.au3>

Local $aArray
 _FileReadToArray(@DesktopDir & "assets.txt", $aArray)
 _ArrayDisplay($aArray)

√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

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  

×