Teflon Posted June 14, 2012 Share Posted June 14, 2012 Very noob question, but can AutoIt handle working with multiple arrays at the same time? For example, if I _FileListToArray, can I build another array based off of certain file attributes of subdirs from the _FileListToArray? Link to comment Share on other sites More sharing options...
jdelaney Posted June 14, 2012 Share Posted June 14, 2012 (edited) Name the arrays differently, and you can do whatever you want. Somthing like $Dir = "YourDir" $oFS = ObjCreate("Scripting.FileSystemObject") $aArray1 = _FileListToArray($Dir,"*",1) ; only return files $iCounter = 1 Dim $aArray2[$iCounter] For $i=1 To ubound($aArray1) - 1 $oFile = $oFS.getFile($Dir & "" & $aArray1[$i]) If $oFile.attributeyouneedtocheckagainst="BLAH" Then ; add your conditions here ReDim $aArray2[$iCounter] $aArray2[$iCounter] = $aArray1[$i] $iCounter = $iCounter + 1 EndIf Next If you are only looking at names, then change the filter param on _FileListToArray Edited June 14, 2012 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
czardas Posted June 15, 2012 Share Posted June 15, 2012 You can create multiple arrays with different names, but for this it might be better to use a two dimensional array which is basically a table. There are plenty of examples to study on this forum. You might want to start here. operator64 ArrayWorkshop 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