Beispiel #1
0
def click_at(x, y, cm=False):
    mouse = Mouse()
    button = Button.left
    if cm:
        x = int(x * 1366 / 34.3)
        y = int(y * 768 / 19.3)
    mouse.position = (x, y)
    mouse.position = (x, y)
    mouse.click(button)
Beispiel #2
0
def main():
    mouse = Mouse()
    mouse.move(450, 450)
    mouse.press(Button.left)
    mouse.release(Button.left)

    time.sleep(2)

    keyboard = Keyboard()
    keyboard.type('sunny')
    keyboard.press(Key.space)
    keyboard.release(Key.space)

    keyboard.press(Key.enter)
    keyboard.release(Key.enter)
Beispiel #3
0
    def auto_clicker():
        mouse = Mouse()
        random_event = random.randint(1, 100)

        choices = ["left", "right", "up", "down"]

        if random_event > 98:
            choice = random.choice(choices)

            # Left Camera Movement
            if choice == "left":
                print("Left Movement")
                PressKey(A)
                time.sleep(0.1)
                ReleaseKey(A)
                PressKey(D)
                time.sleep(0.1)
                ReleaseKey(D)
                time.sleep(1)

            elif choice == "right":  # Right Camera Movement
                print("Right Movement")
                PressKey(D)
                time.sleep(0.1)
                ReleaseKey(D)
                PressKey(A)
                time.sleep(0.1)
                ReleaseKey(A)
                time.sleep(1)

            elif choice == "up":  # Right Camera Movement
                random_movement = random.randint(0, 10)
                Move(0, -random_movement)
                time.sleep(2)
                Move(0, random_movement)
                time.sleep(2)

            elif choice == "down":  # Right Camera Movement
                random_movement = random.randint(0, 10)
                Move(0, random_movement)
                time.sleep(2)
                Move(0, -random_movement)
                time.sleep(2)

        mouse.click(Button.right)  # Clicks the left mouse button once
        time.sleep(random.uniform(0.2, 0.3))
Beispiel #4
0
max_people_allowed = 0  # Maximale Anzahl drinnen befiindlicher Personen
people_inside = 0  # Momentane Anzahl der drinnen befindlichen Personen

index_video = 0  # Index des Angeteigten Videos
file_list = []  # Gefundene Video dateien
server = []  # Platzhalter für OSC Server

checked_in_ips = [
]  # Sammelstelle der IPs/Devices ,welche Nachrichten an den Master schicken
first_time_video_played = True  # Wird zum ersten Mal ein Video abgespielt ?

video_player = []  # Platzhalter für OMXPlayer

keyboard = Controller()  # ??
mouse = Mouse()  # Maus-Kontorller um Maus vom Bildschirm zu schieben
mouse.position = (10000, 10000)  # Masu aus den Bildschirm schieben
root = Tk()  # TK root
local_ip = None  # Platzhalter für eigene IP des Gerätes
is_master_modus = False  # Default für Master

# Ermitterlung der eigenen IP im Wifi Netzwerk, , an der IP wird Master/Slave Stauts ermittelt. 192.168.4.1
# -> Master, alle weiteren IP -> Slave
while local_ip is None:
    try:
        local_ip = get_ip()
        if local_ip == '192.168.4.1':
            is_master_modus = True

    except:
        print("Waiting for Network to be online")
Beispiel #5
0
        'shiftleft', 'shiftright', 'sleep', 'space', 'stop', 'subtract', 'tab',
        'up', 'volumedown', 'volumemute', 'volumeup', 'win', 'winleft',
        'winright', 'yen', 'command', 'option', 'optionleft', 'optionright'
    ]


def get_key(id):
    return get_keys()[id]


def get_id(key):
    return get_keys().index(key)


keyboard = Keyboard()
mouse = Mouse()


# Mouse:
def move(x, y):
    mouse.position = (x, y)
    return


def scroll(x, y):
    mouse.scroll(x, y)
    return


def click(x, y):
    mouse.press(Button.left)
Beispiel #6
0
def main():
    ms = Mouse()
    kb = Keyboard()
    for i in range(2):
        TellHer(ms, kb)