Search the Community
Showing results for tags 'ccleaner'.
-
I have be working on this stuff since april on my own and i'm about ready to call it quits. It should be possible to do. If your good at scripting. I'm getting better but need some help. I can get the clicks to work but not the timer. Want to save as much time as i can. so instead of a timer that goes way over what is needed to run the scan or scans, i want to apply this to many programs i use for computer cleanups in my shop. Can't get it to click next button when button becomes active again. any help much appreciated. Here is my code. The closing of the browsers isnt working muchless the image detection. Maybe its not getting to it. would be nice if it would show you where it go stuck. thankyou. #RequireAdmin ;Gives you admin rights ; By doing this you can have folder anywhere just as long as exe is in same folder as script. Run(@ScriptDir & '\CCleaner.exe') ; Always use this, it does mapping using the window versus the the whole screen, because every computer can have diff. resolutions. ; have to change it in the info getter too. options/coordmode/windows AutoItSetOption('MouseCoordMode', 0) While ProcessExists("iexplore.exe") ProcessClose("iexplore.exe") Sleep(100) WEnd While ProcessExists("safari.exe") ProcessClose("safari.exe") Sleep(100) WEnd While ProcessExists("microsoftedge.exe") ProcessClose("microsoftedge.exe") Sleep(100) WEnd While ProcessExists("firefox.exe") ProcessClose("firefox.exe") Sleep(100) WEnd While ProcessExists("chrome.exe") ProcessClose("chrome.exe") Sleep(100) WEnd ;Waits for our window to come up WinWait("Piriform CCleaner") ;When it see's it the windows gets activated right away. WinActivate("Piriform CCleaner") Sleep(900) ;primary means left click mouse, secondary means to right click. coord for where button is from info from mouse tab on into tool. 1 means 1 click. MouseClick('primary', 727, 530, 1, 0) #include <ImageSearch.au3> HotKeySet("p", "checkForImage") global $y = 0, $x = 0 Func checkForImage() Local $search = _ImageSearch('checkImage.bmp', 0, $x, $y, 0) If $search = 1 Then MouseMove($x, $y, 10) EndIf EndFunc while 1 sleep(200) WEnd WinWait("Piriform CCleaner") ;When it see's it the windows gets activated right away. WinActivate("Piriform CCleaner") Sleep(300) ;Application tab click. MouseClick('primary', 523, 151, 1, 0) Sleep(3000) MouseClick('primary', 275, 114, 1, 0) Sleep(344) WinWait("Piriform CCleaner") ;When it see's it the windows gets activated right away. WinActivate("Piriform CCleaner") MouseClick('primary', 716, 521, 1, 0) Sleep(3000) ;goto reg Send("!g") ;scan reg Send('!s') Sleep(3000) Send('!f') MouseClick('primary', 565, 520, 1, 0) ;scan reg Send('!s') Sleep(2000) Send('!f') MouseClick('primary', 565, 520, 1, 0) WinClose