Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

CCleaner daily routine

$
0
0

Hello,

Im trying to make program for pc cleaning over night.

Basicaly script should run 3 programs, when 1st finish work other start.

So my programs is Avira(scan pc),Ultradefragmenter(hdd defragmentation) and ccleaner (repairs registry and clean junk files)

ccleaner have some magic :alien:

I can't navigate ccleaner, or do anythink.just start

I searched examples but it didnt helped for ccleaner v 5.02.5101

also tried autoit  recording

 

In code comments in my native language but works like that, select program, and with green button all starts.

result: opens ccleaner->nothing heppening

Solutions?

AutoIt         
#include <GUIConstantsEx.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <SendMessage.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> Meniu() Func Meniu()     ; Create a GUI with various controls.     Local $hGUI = GUICreate("Programos kompiuterio tvarkymui")     ; Display the GUI. GUICtrlCreateLabel("Pasirinkti programas is Programfiles", 130, 10)     GUISetState(@SW_SHOW, $hGUI)     Local $idCCfile = GUICtrlCreateButton("CCleaner", 10, 30, 100, 25)   ; GUICtrlCreateProgress(120, 30, 200, 20, $PBS_MARQUEE)   ; _SendMessage(GUICtrlGetHandle(-1), $PBM_SETMARQUEE, True, 50)   GUICtrlCreateLabel("Pasirinkite iseiti arba Pradeti", 130, 75)   Local $idOK = GUICtrlCreateButton("Iseiti", 10,100, 100, 60)   GUICtrlSetBkColor($idOK , 0xFF0000) ;raudonas     Local $idUltraDefragmenter = GUICtrlCreateButton("UltraDefragmenter", 120, 30, 100, 25)     ;   GUICtrlCreateProgress(120, 55, 200, 20, $PBS_MARQUEE)  ;  _SendMessage(GUICtrlGetHandle(-1), $PBM_SETMARQUEE, True, 50)     Local $idAvira = GUICtrlCreateButton("Avira", 240,30, 100, 25)     ;   GUICtrlCreateProgress(120, 90, 200, 20, $PBS_MARQUEE)  ;  _SendMessage(GUICtrlGetHandle(-1), $PBM_SETMARQUEE, True, 50)  Local $idStart = GUICtrlCreateButton("Pradeti", 240, 100, 100, 60) GUICtrlSetBkColor($idStart, 0x33FF00    ) ;green   While 1      Switch GUIGetMsg()      Case $idCCfile          Local Const $sMessage = "Pasirinkite programa CCleaner"          Local $sFileOpenDialog = FileOpenDialog($sMessage, @ProgramFilesDir & "\", "Programos (*.exe)", $FD_FILEMUSTEXIST + $FD_MULTISELECT)          If @error Then         ; Display the error message.         MsgBox($MB_SYSTEMMODAL, "", "CCleaner nebuvo pasirinktas")         ; Change the working directory (@WorkingDir) back to the location of the script directory as FileOpenDialog sets it to the last accessed folder.         FileChangeDir(@ScriptDir)       Else         ; Change the working directory (@WorkingDir) back to the location of the script directory as FileOpenDialog sets it to the last accessed folder.         FileChangeDir(@ScriptDir)         ; Replace instances of "|" with @CRLF in the string returned by FileOpenDialog.         $sFileOpenDialog = StringReplace($sFileOpenDialog, "|", @CRLF)         ; Display the list of selected files.         MsgBox($MB_SYSTEMMODAL, "", "Tikekimes jus is tikruju pasirinkote CCleaner" & @CRLF & $sFileOpenDialog)       EndIf          Case $idUltraDefragmenter              Msgbox(0,"2","2")          Case $idAvira              Msgbox(0,"3","3")           Case $idStart             global $CCfile = $sFileOpenDialog             Call("Start")          Case $idOK              exit     EndSwitch  WEnd     GUIDelete($hGUI)  EndFunc   ;==>Example Func Start() run ($CCfile) sleep(1000) ;ccleaner lazy code EndFunc

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>