Ejemplo n.º 1
0
def click_mouse():
    # Move mouse to top-middle position.
    USER32.SetCursorPos(RESOLUTION["x"] / 2, 0)
    # Mouse down.
    USER32.mouse_event(2, 0, 0, 0, None)
    KERNEL32.Sleep(50)
    # Mouse up.
    USER32.mouse_event(4, 0, 0, 0, None)
Ejemplo n.º 2
0
def click_mouse():
    # Move mouse to top-middle position.
    USER32.SetCursorPos(RESOLUTION["x"] / 2, 0)
    # Mouse down.
    USER32.mouse_event(2, 0, 0, 0, None)
    KERNEL32.Sleep(50)
    # Mouse up.
    USER32.mouse_event(4, 0, 0, 0, None)
Ejemplo n.º 3
0
def click_mouse():
    # Move mouse to either top or bottom of the screen, with a bit of randomness
    USER32.SetCursorPos(RESOLUTION["x"] / random.choice([2, 4, 8]),
                        random.choice([0, RESOLUTION["y"]]))
    # Mouse down.
    USER32.mouse_event(2, 0, 0, 0, None)
    KERNEL32.Sleep(random.choice([20, 30, 40, 50]))
    # Mouse up.
    USER32.mouse_event(4, 0, 0, 0, None)
Ejemplo n.º 4
0
def click_mouse():
    USER32.mouse_event(4, 0, 0, 0, None)
Ejemplo n.º 5
0
def move_mouse():
    x = random.randint(0, RESOLUTION["x"])
    y = random.randint(0, RESOLUTION["y"])

    USER32.mouse_event(1, x, y, 0, None)
Ejemplo n.º 6
0
def click_mouse():
    # Mouse down.
    USER32.mouse_event(2, 0, 0, 0, None)
    KERNEL32.Sleep(50)
    # Mouse up.
    USER32.mouse_event(4, 0, 0, 0, None)
Ejemplo n.º 7
0
def click_mouse():
    USER32.mouse_event(4, 0, 0, 0, None)
Ejemplo n.º 8
0
def move_mouse():
    x = random.randint(0, RESOLUTION["x"])
    y = random.randint(0, RESOLUTION["y"])

    USER32.mouse_event(1, x, y, 0, None)
Ejemplo n.º 9
0
def click_mouse(x, y):
    log.debug("click_mouse (%d, %d)", x, y)
    USER32.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, x, y, 0, 0)
    USER32.mouse_event(win32con.MOUSEEVENTF_LEFTUP, x, y, 0, 0)
Ejemplo n.º 10
0
def click_mouse():
    # mouse down
    USER32.mouse_event(2, 0, 0, 0, None)
    KERNEL32.Sleep(50)
    # mouse up
    USER32.mouse_event(4, 0, 0, 0, None)