Exemplo n.º 1
0
        if (pre_y != None):
            d_y = val - pre_y
            pre_y = val
        else:
            pre_y = val
            continue

        if not cur_anchor_y:
            cur_anchor_y = val
        elif is_scrolled:
            scroll(d_y)
        else:
            rev = -1 if not horizontal else 1
            d_y = pow(abs(d_y) * MOVE_SENSITIVITY,
                      MOVE_SCALING) * sing(d_y) * rev
            m.move_dy(round(d_y))
        pre_y = val

    elif 'BTN_TOUCH' in line:
        cur_start_pos = list(m.position())

        val = line.split()[3]
        if val == 'UP':
            if wasnt_moved() and not is_scrolled:
                press_time = get_time_delta_in_microseconds(
                    press_down_time, datetime.now())
                if press_time < SHORT_PRESS:
                    count_click += 1
                elif not is_stop and press_time < MEDIUM_PRESS:
                    m.click(2)
                else: