Jump to content
Sign in to follow this  
mankeluvsit

Newbie here.

Recommended Posts

mankeluvsit

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.

Share this post


Link to post
Share on other sites
funkey

Look at DirRemove and FileDelete in the documentation.


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites
martin

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.

Share this post


Link to post
Share on other sites
mankeluvsit

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.

Share this post


Link to post
Share on other sites
JohnOne

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.

Share this post


Link to post
Share on other sites
mankeluvsit

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!

Share this post


Link to post
Share on other sites
JohnOne

$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.

Share this post


Link to post
Share on other sites
mankeluvsit

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.

Share this post


Link to post
Share on other sites
Jos

Read your If and ElseIf again. What are you comparing the 6 and 7 with?

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
mankeluvsit

Read your If and ElseIf again. What are you comparing the 6 and 7 with?

MsgBox(4, "Steam", "Delete everything?")

4 = Yes and No

6 = yes and 7 = no.

im trying to make it realize what button is being pushed

Share this post


Link to post
Share on other sites
mankeluvsit

$rtn = MsgBox(4, "Steam", "Delete everything?")

If $rtn = 6 Then

;code

Endif

wow, i feel dumb, i knew i was missing that, thank you so much!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.