示例#1
0
def send_input_select(x1, y1, x2, y2):
    s = control.nexus().comm.get_com("grids")
    s.move_mouse(int(x1), int(y1))
    _x1, _y1 = get_cursor_position()
    s.move_mouse(int(x2), int(y2))
    _x2, _y2 = get_cursor_position()
    s.kill()
    navigation.wait_for_grid_exit()
    drag_from_to(_x1, _y1, _x2, _y2)
示例#2
0
def send_input_select(pre1, color1, n1, pre2, color2, n2):
    s = control.nexus().comm.get_com("grids")
    s.move_mouse(int(pre1), int(color1), int(n1))
    _x1, _y1 = get_cursor_position()
    s.move_mouse(int(pre2), int(color2), int(n2))
    _x2, _y2 = get_cursor_position()
    s.kill()
    navigation.wait_for_grid_exit()
    drag_from_to(_x1, _y1, _x2, _y2)
示例#3
0
def select_text():
    global x1, y1, x2, y2
    x2, y2 = get_cursor_position()
    s = control.nexus().comm.get_com("grids")
    s.kill()
    navigation.wait_for_grid_exit()
    drag_from_to(x1, y1, x2, y2)
 def calculate_target_window_destination(self, src_position):
     # The destination of the target window is the source position with
     #  its top left-hand corner at the current cursor position.
     x_mouse, y_mouse = get_cursor_position()
     src_position.x1 = x_mouse
     src_position.y1 = y_mouse
     return src_position
 def calculate_target_window_destination(self, src_position):
     # The destination of the target window is the source position
     #  centered on the current cursor position.
     x_mouse, y_mouse = get_cursor_position()
     relative_x_center = src_position.x_center - src_position.x1
     relative_y_center = src_position.y_center - src_position.y1
     src_position.x1 = x_mouse - relative_x_center
     src_position.y1 = y_mouse - relative_y_center
     return src_position
示例#6
0
def store_first_point():
    global x1, y1
    x1, y1 = get_cursor_position()