예제 #1
0
    def login(self):
        # empty bits on bitmap, idk how they made the launcher
        # self.locator()
        # Just send input
        # Decrypt our user name and pw. IF you want to continue,
        # generate a new key for your own credentials; or remove the encryption all together.
        self.key = self.load_key()
        f = Fernet(self.key)
        pdi.press(['tab'])
        sleep(0.05)
        pdi.typewrite(f.decrypt(self.user).decode())
        sleep(0.05)
        pdi.press(['tab'])
        sleep(0.05)
        pdi.typewrite(f.decrypt(self.pw).decode())
        sleep(0.05)
        pdi.press(['enter'])
        sleep(0.05)

        # Wait for TTR
        self.wincap.wait_hwnd()
        sleep(10.5)
        pdi.press(['up'])
        sleep(4.5)
        self.wincap = WindowCapture(self.haystack_wnd)
        self.vision = Vision("targets/bear.png")
        self.bot = TTRBot((self.wincap.offset_x, self.wincap.offset_y),
                          (self.wincap.w, self.wincap.h),
                          'tooltips/tooltip_bear.png')
예제 #2
0
def clicks_and_typing():
    pydirectinput.moveTo(500, 300)
    time.sleep(1)
    pydirectinput.click(500, 400)
    pydirectinput.keyDown('g')
    time.sleep(0.05)
    pydirectinput.keyUp('g')
    time.sleep(0.05)
    pydirectinput.press(['c', 'v', 't'])
    time.sleep(0.05)
    pydirectinput.typewrite('myword')
예제 #3
0
    def __init__(self, target, haystack_wnd='Toontown Rewritten'):
        # Window Capture has default to TTR, else we choose from main.
        self.wincap = WindowCapture(window_name=haystack_wnd)
        # Previously, we had to use the object to call this function.
        # Now that it is static, we can call the class directly.
        # wincap.list_window_names()
        # WindowCapture.list_window_names()

        # check foreground window title
        current = self.wincap.title()
        """ 
        The Encryption Method I used:
            click.write_key()
            key = click.load_key()
            message1 = user.encode()
            print(message1) - bytes now
            message2 = pw.encode()
            print(message2)
            f = Fernet(key)
            encrypted1 = f.encrypt(message1)
            encrypted2 = f.encrypt(message2)

            print(encrypted1)
            print(encrypted2)
        """
        # Decrypt our user name and pw. IF you want to use it,
        # remove the encryption method, or generate your own encrypted values.
        # Add in your own user/pw instead.``
        self.key = self.load_key()
        f = Fernet(self.key)

        # Target is selectable from main file now.
        if (current == "Toontown Rewritten Launcher"):
            # Make TextBox Bigger
            self.vision_target = Vision('TextBox.png')

            # empty bits on bitmap, idk how they made the launcher
            # self.locator()
            # Just send input
            pdi.press(['tab'])
            time.sleep(0.05)
            pdi.typewrite(f.decrypt(self.user).decode())
            time.sleep(0.05)
            pdi.press(['tab'])
            time.sleep(0.05)
            pdi.typewrite(f.decrypt(self.pw).decode())
            time.sleep(0.05)
            pdi.press(['enter'])
            time.sleep(0.05)
        else:
            self.vision_target = Vision(target)
            # Only find best match
            self.locator(multi=False)
예제 #4
0
import pydirectinput as auto
from time import sleep

sleep(5)
auto.typewrite(
    "https://drive.google.com/file/d/1BpdL8eGW4B7jUD2iKolFmBAtEWo9WERS/view?usp=sharing"
)
     obs()
     mouse.press(Button.left)
     time.sleep(3)
     mouse.release(Button.left)
 if msg == "hold mouse long":
     obs()
     mouse.press(Button.left)
     time.sleep(9)
     mouse.release(Button.left)
 if msg.startswith('type '):
     try:
         typeMsg = msg_preserve_caps[5:]
         lengg = len(typeMsg)
         if reg3.search(typeMsg) and lengg == 1:
             obs()
             pydirectinput.typewrite(typeMsg.lower())
         elif reg2.findall(typeMsg) and lengg != 1:
             obs()
             pydirectinput.typewrite(typeMsg.lower())
         elif reg.search(typeMsg):
             obs()
             pydirectinput.typewrite(typeMsg)
         else:
             obs()
             pydirectinput.typewrite(typeMsg)
     except:
         print("Typing this particular message didn't work: " + msg)
 if msg.startswith("go to "):
     try:
         obs()
         coord = msg[6:]
예제 #6
0
from time import sleep

import pydirectinput as auto

# Open A Chrome
auto.leftClick(464, 1059)
sleep(1)

# Open A New Tab
auto.keyDown('ctrl')
auto.typewrite('n')
auto.keyUp('ctrl')

# Go To The Site
auto.write('https')
auto.keyDown('shift')
auto.write(';')
auto.keyUp('shift')
auto.write('//dailyhealth.rit.edu/')
auto.press('enter')
sleep(1)

# Enter Site
auto.leftClick(296, 438)
sleep(1)

# Click No
auto.leftClick(991, 632)
sleep(1)

# Close Site