blakela Posted June 16, 2008 Share Posted June 16, 2008 I need to declare a variable array, such as a list of names, then do a loop applying each variable to the script until all variable have been used. For instance: Array: John, Mary, Bob, Alice For x=1 to number of entries in array do processing repeat Also is it possible to have this "array" be an external text file that I can edit outside of the script? That would allow me to compile my script and only edit the text file to add or take away names in the array. Any ideas? Link to comment Share on other sites More sharing options...
Danny35d Posted June 17, 2008 Share Posted June 17, 2008 Look at the help file and search for _FileReadToArray which reads a specified file into an array.This is an example from the help file:#include <file.au3> Dim $aRecords If Not _FileReadToArray("error.log",$aRecords) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf For $x = 1 to $aRecords[0] Msgbox(0,'Record:' & $x, $aRecords[$x]) Next AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now