Some fucking thing

Discussion in 'Python' started by Lolicon, Nov 25, 2017.

Tags:
  1. Lolicon

    Lolicon Noob

    Joined:
    Jan 1, 2017
    Messages:
    14
    Likes Received:
    0
    Reputation:
    0
    Linux
    Linux
    Chrome 61.0.3163.91
    Chrome 61.0.3163.91
    Code:
    import os, sys, subprocess, requests, time, winsound, random
    try:
        import pyautogui
    except Exception as e:
        print("[Importer] pyautogui not found, installing")
        try:
            subprocess.call(['pip','install','PyAutoGUI'])
        except:
            0
        try:
            subprocess.call(['python','-m','pip','install','PyAutoGUI'])
        except:
            0
        print("[Importer] installed pyautogui, retarting")
        os.system("\"" + os.path.realpath(sys.argv[0]) + "\"")
    else:
        screenWidth, screenHeight = pyautogui.size()
        print("[Importer] loaded pyautogui")
        if not os.path.exists(".music.wav"):
            print("[Downloader] Downloading http://smaller.hol.es/vs.wav")
            http_handle = requests.get("http://smaller.hol.es/vs.wav")
            print("[Downloader] Saving to .music.wav")
            file = open(".music.wav","wb")
            file.write(http_handle.content)
            print("[Downloader] Done!")
        else:
            print("[Downloader] Skipping as .music.wav already exists")
        while True:
            winsound.PlaySound(".music.wav", winsound.SND_ASYNC)
            print("[WinSound] Playing .music.wav")
            for i in range(0,160):
                pyautogui.moveTo(random.randint(1,screenWidth), random.randint(1,screenHeight), duration=1.4875, tween=pyautogui.pytweening.easeInOutQuad)
    #            time.sleep(1.4875)
            break
     

Share This Page

Users Viewing Thread (Users: 0, Guests: 0)