norjms Posted December 4, 2009 Share Posted December 4, 2009 I read the help file and copied the example script. The script works if I don't use $sFilter = "*" or $iFlag = 1 why? I'm trying to figure it out and how to use the flags. #Include <File.au3> #Include <Array.au3> $FileList =_FileListToArray(@ScriptDir & "\Rip Source" , $sFilter = "*", $iFlag = 1) If @Error=1 Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf _ArrayDisplay($FileList,"$FileList") Link to comment Share on other sites More sharing options...
avery Posted December 4, 2009 Share Posted December 4, 2009 I read the help file and copied the example script. The script works if I don't use $sFilter = "*" or $iFlag = 1 why? I'm trying to figure it out and how to use the flags. #Include <File.au3> #Include <Array.au3> $FileList =_FileListToArray(@ScriptDir & "\Rip Source" , $sFilter = "*", $iFlag = 1) If @Error=1 Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf _ArrayDisplay($FileList,"$FileList") I played with this once and thought I used *.* for the Mask/Filter. Have you tried that? I will try to dig up my program that used this once I finish this cup of coffee =) www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org Link to comment Share on other sites More sharing options...
norjms Posted December 4, 2009 Author Share Posted December 4, 2009 I removed the filer to just check each variable by itself like so $FileList =_FileListToArray(@ScriptDir & "\Rip Source", $iFlag = 1) >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /AU3Check /in "D:\Working\DoVideoTSEncode.au3" +>22:24:02 Starting AutoIt3Wrapper v.2.0.0.3 Environment(Language:0409 Keyboard:00000409 OS:WIN_VISTA/ CPU:X64 OS:X64) >Running AU3Check (1.54.14.0) from:C:\Program Files (x86)\AutoIt3 D:\Working\DoVideoTSEncode.au3(14,65) : WARNING: $sFilter: possibly used before declaration. $FileList=_FileListToArray(@ScriptDir & "\Rip Source", $sFilter = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ D:\Working\DoVideoTSEncode.au3(14,79) : WARNING: $iFlag: possibly used before declaration. $FileList=_FileListToArray(@ScriptDir & "\Rip Source", $sFilter = "*", $iFlag = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ D:\Working\DoVideoTSEncode.au3(14,65) : ERROR: $sFilter: undeclared global variable. $FileList=_FileListToArray(@ScriptDir & "\Rip Source", $sFilter = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ D:\Working\DoVideoTSEncode.au3 - 1 error(s), 2 warning(s) !>22:24:02 AU3Check ended.rc:2 +>22:24:02 AutoIt3Wrapper Finished >Exit code: 0 Time: 0.344 It says I'm declaring a variable not just using an optional switch. Not too sure how to proceed. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted December 4, 2009 Share Posted December 4, 2009 You can't declare a variable in a function call!; $FileList =_FileListToArray(@ScriptDir & "\Rip Source" , "*", 1) .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
norjms Posted December 4, 2009 Author Share Posted December 4, 2009 You can't declare a variable in a function call!; $FileList =_FileListToArray(@ScriptDir & "\Rip Source" , "*", 1) ok now I understand and got it to work the help file could be more clear on how to use the switches. 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