Jump to content

Multiple Concurrent Arrays?


Recommended Posts

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

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 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...