Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #simple code which will close any instances of a browser application, this is very harmless just some fun I was making.
- import os
- import time
- print("Welcome to Exam's Application Exit Program")
- while True:
- answer = input('Do you want to close your current browsers? y/n:')
- if answer.lower().startswith("y"):
- print("ok, exiting browser applications in \n3")
- time.sleep(1)
- print("2")
- time.sleep(1)
- print("1")
- time.sleep(1)
- os.system("taskkill /im chrome.exe /f")
- os.system("taskkill /im msedge.exe /f")
- os.system("taskkill /im MicrosoftEdge.exe /f")
- os.system("taskkill /im firefox.exe /f")
- os.system("taskkill /im opera.exe /f")
- os.system("taskkill /im iexplore.exe /f")
- os.system("taskkill /im safari.exe /f")
- time.sleep(5)
- print("done!")
- exit()
- elif answer.lower().startswith("n"):
- print("Action Cancelled!")
- time.sleep(1)
- print("Closing in\n3")
- time.sleep(1)
- print("2")
- time.sleep(1)
- print("1")
- exit()
Add Comment
Please, Sign In to add comment