El-Arabi Posted March 13, 2012 Share Posted March 13, 2012 Arkadaşlar autoit ile yapmaya çalıştıgım bir progrma var fakat bu kodlarla commandline ı çalıştıramadım.Örnek çalışma aşağıda bakarsanız hata ile beraber göreceksiniz ne demek istediğimi. http://www.mediafire.com/?4uzzymhyi3zd89w Quote Link to comment Share on other sites More sharing options...
blue_life Posted March 13, 2012 Share Posted March 13, 2012 @El-Arabi Commandline derken komut istemi şeklinde bir guimi oluşturmak, veyahut yaptığın programın parametreli bir şekilde çalışmasını mı istiyorsun? Quote Link to comment Share on other sites More sharing options...
El-Arabi Posted March 13, 2012 Author Share Posted March 13, 2012 Yaptıgım programın parametre ile çalışmasını istiyorum mesela orada /iehistory var ben x.exe /iehistory diye çalıştırdıgım zaman /iehistory için yazdıgım kodlar çalışacak kodların neresinde problem var çözemedim. Quote Link to comment Share on other sites More sharing options...
blue_life Posted March 13, 2012 Share Posted March 13, 2012 Beb kodları kısaltıp vereyim, sen diğerlerini eklersin... [codebox] #include <File.au3> #include <Array.au3> $Debug = 1 If $CmdLine[0] = 0 Then MsgBox(16, "", "Uygun parametreyi giriniz!") Exit Else For $i = 1 To $CmdLine[0] Switch $CmdLine[$i] Case "/iecookies" EmptyFolder(@HomeDrive & @HomePath & "\Cookies") Case "/iehistory" EmptyFolder(@HomeDrive & @HomePath & "\Local Settings\History") Case "/iehistory" EmptyFolder(@HomeDrive & "\Temp\Temporary Internet Files") EndSwitch Next ShellExecuteWait("RunDll32.exe", " InetCpl.cpl,ClearMyTracksByProcess 255") EndIf Exit Func EmptyFolder($FolderToDelete) $AllFiles = _FileListToArray($FolderToDelete, "*", 0) If $Debug Then ConsoleWrite("-->" & $FolderToDelete & @CRLF) If IsArray($AllFiles) Then If $Debug Then _ArrayDisplay($AllFiles, $FolderToDelete) EndIf For $i = 1 To $AllFiles[0] $crt = FileGetTime($FolderToDelete & "\" & $AllFiles[$i], 1) If $crt[2] = @MDAY And $crt[0] = @YEAR And $crt[1] = @MON Then If $Debug Then ConsoleWrite($FolderToDelete & "\" & $AllFiles[$i] & " --> Today's File, Skipping!" & @CRLF) EndIf ContinueLoop EndIf $delete = FileDelete($FolderToDelete & "\" & $AllFiles[$i]) If $Debug Then ConsoleWrite($FolderToDelete & "\" & $AllFiles[$i] & " =>" & $delete & @CRLF) EndIf DirRemove($FolderToDelete & "\" & $AllFiles[$i], 1) Next EndIf EndFunc ;==>EmptyFolder[/codebox] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.