mankeluvsit Posted March 7, 2010 Share Posted March 7, 2010 Hai. im trying to convert my bat file into a au3 to make it easier on me. i have a reg file run every time i start steam. and i run a bat file before every time i start steam. cd\ cd Program Files\Steam del /S AppUpdateStats.blob del /S Steam.log del /Q /F appcache del /Q /F logs echo Deleting Files echo File Deleted exit can someone help me with this? thanks. Link to comment Share on other sites More sharing options...
funkey Posted March 7, 2010 Share Posted March 7, 2010 Look at DirRemove and FileDelete in the documentation. Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
martin Posted March 7, 2010 Share Posted March 7, 2010 Hai. im trying to convert my bat file into a au3 to make it easier on me. i have a reg file run every time i start steam. and i run a bat file before every time i start steam. cd\ cd Program Files\Steam del /S AppUpdateStats.blob del /S Steam.log del /Q /F appcache del /Q /F logs echo Deleting Files echo File Deleted exit can someone help me with this? thanks. Yes, the help file is what you need. Look up FileChangeDir, FileDelete and MsgBox and the related topics for each for that batch file. While you are there though look at the contents and get an idea of what is included. The help file should be your first port of call when you have a problem and the forum your second when you have a script which doesn't work and you can't understand why. Searching will find the answer to most problems. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
mankeluvsit Posted March 7, 2010 Author Share Posted March 7, 2010 for some reason i cant edit my posts now, sorry for double posting. this is what im trying to get at. $steam = "C:\Program Files (x86)\Steam" $appcache = "\appcache" $logs = "\logs" MsgBox(4, "Steam", "Delete everything?") If 6 Then RegDelete("HKEY_CURRENT_USER\Software\Valve\Steam\Users") DirRemove($steam & "" & $appcache, 1) DirRemove($steam & "" & $logs, 1) FileDelete($steam & "" & "\AppUpdateStats.blob") FileDelete($steam & "" & "\Steam.log") Elseif 7 then MsgBox(4096,"", "You decided to not delete") EndIf its not working right. Link to comment Share on other sites More sharing options...
JohnOne Posted March 7, 2010 Share Posted March 7, 2010 Hi mankeluvsit. If you can go from from nothing to what you have in 30 minutes, I'm sure you can handle a Msgbox(). Dont stop now mate, you're on a roll here. Look at the Msgbox() function, and its flags inparticular. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
mankeluvsit Posted March 7, 2010 Author Share Posted March 7, 2010 Hi mankeluvsit.If you can go from from nothing to what you have in 30 minutes, I'm sure you can handle a Msgbox().Dont stop now mate, you're on a roll here.Look at the Msgbox() function, and its flags inparticular.and you just do me a solid and check my above post?im so lost! Link to comment Share on other sites More sharing options...
JohnOne Posted March 7, 2010 Share Posted March 7, 2010 $steam = "C:\Program Files (x86)\Steam" $appcache = "\appcache" $logs = "\logs" MsgBox(4, "Steam", "Delete everything?") If 6 Then RegDelete("HKEY_CURRENT_USER\Software\Valve\Steam\Users") DirRemove($steam & $appcache, 1) DirRemove($steam & $logs, 1) FileDelete($steam & "\AppUpdateStats.blob") FileDelete($steam & "\Steam.log") Elseif 7 then MsgBox(4096,"", "You decided to not delete") Else Exit EndIf I'm no guru mate, but I think you may not need the extra quotes in the dirremove. So are you getting errors ? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
mankeluvsit Posted March 7, 2010 Author Share Posted March 7, 2010 no errors, but the problem is that wether i click yes or no on the message box, it deletes them anyways. 6 = yes and 7 = no. but im guessing im not doing something right for it to realize what button is being pressed. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 7, 2010 Developers Share Posted March 7, 2010 (edited) Read your If and ElseIf again. What are you comparing the 6 and 7 with? Edited March 7, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
mankeluvsit Posted March 7, 2010 Author Share Posted March 7, 2010 Read your If and ElseIf again. What are you comparing the 6 and 7 with?MsgBox(4, "Steam", "Delete everything?")4 = Yes and No6 = yes and 7 = no.im trying to make it realize what button is being pushed Link to comment Share on other sites More sharing options...
JohnOne Posted March 7, 2010 Share Posted March 7, 2010 $rtn = MsgBox(4, "Steam", "Delete everything?") If $rtn = 6 Then ;code Endif AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
mankeluvsit Posted March 7, 2010 Author Share Posted March 7, 2010 $rtn = MsgBox(4, "Steam", "Delete everything?")If $rtn = 6 Then ;codeEndifwow, i feel dumb, i knew i was missing that, thank you so much! 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