Last active
April 1, 2021 02:38
-
-
Save marcelobbfonseca/f96651cf4ab9993cf83cf3ac0c693163 to your computer and use it in GitHub Desktop.
Python april fool prank
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip install pyautogui | |
# pip install pyobjc-core | |
# pip install pyobjc | |
# python3 software_update.py | |
# Opens baby shark And mouse will freak out. | |
import time | |
import random | |
import pyautogui | |
import webbrowser | |
def move_mouse(how_long_in_seconds): | |
start_time = time.time() | |
time_elapsed = time.time() - start_time | |
xsize, ysize = pyautogui.size() | |
while time_elapsed < how_long_in_seconds: | |
x, y = random.randrange(xsize), random.randrange(ysize) | |
pyautogui.moveTo(x, y, duration=0.2) | |
time_elapsed = time.time() - start_time | |
if __name__ == "__main__": | |
pyautogui.alert("Your Java update is now complete") | |
webbrowser.open("https://youtu.be/_5pQgwB4O6A") | |
move_mouse(120) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add this change to be an ass: