Ejemplo n.º 1
0
def klick(key):
    context = lib.interception_create_context()

    stroke = ffi.new('InterceptionMouseStroke *')

    stroke.state = key
    lib.interception_send(context, 1, stroke, 1)

    lib.interception_destroy_context(context)
Ejemplo n.º 2
0
def mausklick():
    context = lib.interception_create_context()

    stroke = ffi.new('InterceptionMouseStroke *')

    stroke.state = SCANCODE.INTERCEPTION_MOUSE_LEFT_BUTTON_DOWN
    lib.interception_send(context, 11, stroke, 1)
    stroke.state = SCANCODE.INTERCEPTION_MOUSE_LEFT_BUTTON_UP
    lib.interception_send(context, 11, stroke, 1)
    lib.interception_destroy_context(context)
Ejemplo n.º 3
0
def anmelden(benutzer, pw):
    context = lib.interception_create_context()
    kstroke = ffi.new('InterceptionKeyStroke *')

    for key in benutzer:
        kstroke.code = SCANCODE.anmeldedaten[key]
        lib.interception_send(context, 1, kstroke, 1)

    kstroke.code = SCANCODE.TAB
    lib.interception_send(context, 1, kstroke, 1)

    for key in pw:
        kstroke.code = SCANCODE.anmeldedaten[key]
        lib.interception_send(context, 1, kstroke, 1)
Ejemplo n.º 4
0
    else:
        kstrokes.append(kstroke)

    return kstrokes


if __name__ == '__main__':
    import sys

    program_instance = try_open_single_program('407631B6-78D3-4EFC-A868-40BBB7204CF1')
    if not program_instance:
        sys.exit()

    raise_process_priority()

    context = lib.interception_create_context()

    lib.interception_set_filter(context, lib.interception_is_keyboard,
                                lib.INTERCEPTION_FILTER_KEY_DOWN |
                                lib.INTERCEPTION_FILTER_KEY_UP)

    kstroke = ffi.new('InterceptionKeyStroke *')

    while True:
        device = lib.interception_wait(context)
        if not lib.interception_receive(context, device, kstroke, 1):
            break
        kstrokes = caps2esc(kstroke[0])

        if kstrokes:
            lib.interception_send(context, device,