mortalic Posted September 11, 2007 Share Posted September 11, 2007 Func _FileListToArrayByName($f_Directory = @ScriptDir, $e_Extension = "FI*.exe", $f_OutFile = 'C:\LoggedList.txt')oÝ÷ Ù*nÞɲÂäx¡×Á©í¶!jxÖÙyrÚ'ßÛpj{m¢Ê^r'òsOv{a{Mú|ë~)^½ªâi¹^#§¶Ú.±ëa{§v,µé©v*ÓzjC¸j^j»"±«¢+wöÉrººÛaÇhzÉ÷öÛzkhÂäjëh×6Func _FileListToArrayByName($f_Directory = @ScriptDir, $e_Extension = "FI*.exe", $f_OutFile = @TempDir & '\LoggedList.txt')oÝ÷ ØÚ+v¬jëh×6Dim $filePath = @TempDir Func _FileListToArrayByName($f_Directory = @ScriptDir, $e_Extension = "FI*.exe", $f_OutFile = $filePath & '\LoggedList.txt') Obviously I am missing something simple, but hey... I'm still pretty new to this. Care to educate me? Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 11, 2007 Share Posted September 11, 2007 Try it this way: _MyTestFunc(1) _MyTestFunc(2, @ScriptDir) Func _MyTestFunc($n, $sDir = "") If $sDir = "" Then $sDir = @TempDir MsgBox(64, "_MyTestFunc", "Folder: " & $n & " = " & $sDir) EndFunc Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
mortalic Posted September 11, 2007 Author Share Posted September 11, 2007 Try it this way: _MyTestFunc(1) _MyTestFunc(2, @ScriptDir) Func _MyTestFunc($n, $sDir = "") If $sDir = "" Then $sDir = @TempDir MsgBox(64, "_MyTestFunc", "Folder: " & $n & " = " & $sDir) EndFunc Ok I'm looking at your suggestion now, I don't entirely understand it yet so I'm going to read it for a bit and play with it. LOL Link to comment Share on other sites More sharing options...
mortalic Posted September 11, 2007 Author Share Posted September 11, 2007 ok I figured something else out in the interum, I don't need to specify the variable there, I just ledt it "\loggedList.txt" but down where I am using RunWait() and calling my dos command I add it here RunWait(@ComSpec & ' /c ' & 'dir ' & '"' & $f_Directory & '\' & $e_Extension & '"' & ' /b /on > ' & @TempDir & $f_OutFile, '', @SW_HIDE) Thanks for the pointer though. 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