Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' I wrote this because I kept opening too many Google Chrome tabs over a day.
- ' This is purely out of Lua knowledge and online documentation
- MsgBox "I'll ask you if you'd like to terminate chrome.exe every hour.",64,"Chrome Clean-up Cycle Loaded!"
- Do While True
- WScript.Sleep 3600000 ' Wait 3,600,000 ms or 1 hour.
- Dim input
- 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")
- If input = 7 Then
- MsgBox "Loop Terminated. Restart the vbs script if you'd like to continue the chrome clean-up cycle."
- Exit Do
- End If
- If input = 6 Then
- Dim oShell : Set oShell = CreateObject("WScript.Shell")
- oShell.Run "taskkill /im chrome.exe /f", , True
- End If
- Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement