Advertisement
CloneTrooper1019

Chrome Clean-Up Cycle

Jun 3rd, 2014
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ' I wrote this because I kept opening too many Google Chrome tabs over a day.
  2. ' This is purely out of Lua knowledge and online documentation
  3.  
  4. MsgBox "I'll ask you if you'd like to terminate chrome.exe every hour.",64,"Chrome Clean-up Cycle Loaded!"
  5.  
  6. Do While True
  7.     WScript.Sleep 3600000 ' Wait 3,600,000 ms or 1 hour.
  8.     Dim input
  9.     input = MsgBox ("Hey. Its been an hour, do you want to terminate Chrome.exe? Pressing Yes will proceed, and pressing No will terminate the hourly loop.",4,"Don't let Chrome take a shit on your computer m8")
  10.     If input = 7 Then
  11.         MsgBox "Loop Terminated. Restart the vbs script if you'd like to continue the chrome clean-up cycle."
  12.         Exit Do
  13.     End If
  14.     If input = 6 Then
  15.         Dim oShell : Set oShell = CreateObject("WScript.Shell")
  16.         oShell.Run "taskkill /im chrome.exe /f", , True
  17.     End If
  18. Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement