svatvn Posted June 28, 2012 Author Posted June 28, 2012 yeah sure, there is always this error message "line 7, "subscript used with non-Array variable"
Bert Posted June 28, 2012 Posted June 28, 2012 Please post the exact code you just tried and failed with. Thanks. The Vollatran project My blog: http://www.vollysinterestingshit.com/
svatvn Posted June 28, 2012 Author Posted June 28, 2012 its the code from DicatoroftheUSA #include <File.au3> $sDir=@scriptdir $aFiles = _FileListToArray('"'&$sDir&'"', "*.reg") For $I = 1 To $aFiles[0] Run(@comspec & " /k Regedit.exe /S " & '"' & $sdir & "" & $aFiles[$I] & '"') consolewrite(@lf&"Regedit.exe /S " &'"'& $sdir & "" & $aFiles[$I] & '"'&@lf) Next
Bowmore Posted June 28, 2012 Posted June 28, 2012 I believe that the _FileListToArray() function does not require the path to be in quotes. Try this. #include <File.au3> $sDir=@scriptdir $aFiles = _FileListToArray($sDir & "", "*.reg") For $I = 1 To $aFiles[0] Run(@comspec & " /k Regedit.exe /S " & '"' & $sdir & "" & $aFiles[$I] & '"') consolewrite(@lf&"Regedit.exe /S " &'"'& $sdir & "" & $aFiles[$I] & '"'&@lf) Next "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
JohnQSmith Posted June 28, 2012 Posted June 28, 2012 In batch, it's just this linefor %%i in ("%CD%*.reg") do (start /w regedit /s "%%i")why is it so unbelievable complicated in AutoIT? Since you lack a clue, why don't you just run the batch file? Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".
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