Beispiel #1
0
            chrome.hotkey("tab")
            password = get_random_alphanumeric_string(8)
            chrome.write(password)
            chrome.hotkey("tab")
            fill_random_dateofbirth(chrome)

            try:
                chrome.clickAtImg(dir + "web_cookies.PNG")
            except:
                print("Don't need to accept cookies :]")

            chrome.clickAtImg(dir + "web_playnow.PNG")
            time.sleep(4)

            try:
                chrome.locateImg(dir + "web_signup_success.PNG")
            except:
                raise Exception("Account creation failed!")

            # Close tab and verify e-mail
            chrome.hotkey("ctrl", "w")
            time.sleep(2)
            attempt = 0
            sleepTime = 2
            while True:
                if attempt > 7:
                    raise Exception("Still no e-mail after 6 refreshes!")
                try:
                    attempt += 1
                    chrome.clickAtImg(dir + "tempmail_mail.PNG")
                    break
Beispiel #2
0
# Execution loop
if __name__ == "__main__":
    while True:
        # Type something in Discord chat
        try:
            Discord.clickAtImg("dc_input.PNG")
            Discord.write(".")
            Discord.hotkey("enter")
            time.sleep(0.7)
        except:
            print("Couldn't find Discord input field!")
            continue

        # Check whether card spawned
        try:
            startCoord = Discord.locateImg("dc_spawn.PNG")
            countSpawned += 1
        except:
            print("No card spawn detected!")
            time.sleep(30)
            continue

        # Click on the card to enlarge
        Discord.clickAtCoord((startCoord[0] + 100, startCoord[1] + 100))
        time.sleep(0.5)
        try:
            startCoord = Discord.locateImg("dc_card.PNG")
        except:
            print("Did not detect enlarged card!")
            Discord.hotkey("esc")
            continue