def scroll(m):
        numberOfTimes = parse_words_as_integer(m._words)
        if numberOfTimes == None:
            numberOfTimes = 1

        for i in range(0, numberOfTimes):
            ctrl.mouse_scroll(direction * distanceY, direction * distanceX)
 def scroll(m):
     global scrollAmount
     if (scrollAmount >= 0) == (amount >= 0):
         scrollAmount += amount
     else:
         scrollAmount = amount
     ctrl.mouse_scroll(y=amount)
Ejemplo n.º 3
0
 def scroll(m):
     global scrollAmount
     # print("amount is", amount)
     if (scrollAmount >= 0) == (amount >= 0):
         scrollAmount += amount
     else:
         scrollAmount = amount
     ctrl.mouse_scroll(y=amount)
Ejemplo n.º 4
0
 def scroll(m):
     total_time = 0.1
     interval = 0.007
     depth = int(total_time // interval)
     split = amount / depth
     for x in range(depth):
         # split_ret = int((split) * (1 - 0.8 * (((x - (depth / 2)) / float((depth / 2))) ** 2)))
         ctrl.mouse_scroll(y=split)
         time.sleep(interval)
Ejemplo n.º 5
0
 def mouse_smooth_scroll(amount: int):
     """Performs a smooth scrolling motion"""
     total_time = 0.11
     interval = 0.007
     depth = int(total_time // interval)
     split = amount / depth
     for x in range(depth):
         ctrl.mouse_scroll(y=split)
         time.sleep(interval)
Ejemplo n.º 6
0
def threaded_scroll(dir):
    global cancel_scroll
    global scroll_speed
    while True:
        ctrl.mouse_scroll(dir * scroll_speed)
        time.sleep(.1)
        if cancel_scroll == True:
            cancel_scroll = False
            break
Ejemplo n.º 7
0
 def scroll(m):
     if SCROLL_TOTAL_TIME != 0:
         interval = 0.007
         depth = int(SCROLL_TOTAL_TIME // interval)
         split = amount / depth
         for x in range(depth):
             ctrl.mouse_scroll(y=split)
             time.sleep(interval)
     else:
         ctrl.mouse_scroll(y=amount)
Ejemplo n.º 8
0
def gazeScroll():
    windows = ui.windows()
    window = None
    x, y = ctrl.mouse_pos()
    for w in windows:
        if w.rect.contains(x, y):
            window = w.rect
            break
    if window is None:
        return
    midpoint = window.y + window.height / 2
    amount = ((y - midpoint) / (window.height / 10))**3
    ctrl.mouse_scroll(by_lines=False, y=amount)
    def scroll(m):
        total_time = 0.11
        interval = 0.007
        depth = int(total_time // interval)
        split = amount / depth
        numberOfTimes = parse_words_as_integer(m._words)
        if numberOfTimes == None:
            numberOfTimes = 1

        for i in range(0, numberOfTimes):
            for x in range(depth):
                ctrl.mouse_scroll(y=split)
                time.sleep(interval)
Ejemplo n.º 10
0
 def mouse_scroll(y: int = 0, x: int = 0, by_lines: bool = False):
     ctrl.mouse_scroll(y=y, x=x, by_lines=by_lines)
Ejemplo n.º 11
0
 def scroll(m):
     ctrl.mouse_scroll(by_lines=False, y=amount)
Ejemplo n.º 12
0
 def scroll(m):
     print("amount is", amount)
     ctrl.mouse_scroll(y=amount)
Ejemplo n.º 13
0
 def scroll(m):
     global scrollAmount
     print("amount is", amount)
     scrollAmount = amount
     ctrl.mouse_scroll(y=amount)
Ejemplo n.º 14
0
def scrollMe():
    global scrollAmount
    if scrollAmount:
        ctrl.mouse_scroll(y=scrollAmount)
Ejemplo n.º 15
0
 def scroll(m):
     delta = 1 if amount > 0 else -1
     for i in range(0, abs(amount)):
         ctrl.mouse_scroll(y=delta)
Ejemplo n.º 16
0
 def scroll(m):
     ctrl.mouse_scroll(y=amount)
Ejemplo n.º 17
0
 def scroll(m):
     # print("amount is", amount)
     ctrl.mouse_scroll(x=amount)
Ejemplo n.º 18
0
 def eye_scroll_right(self, frame):
     if self.left_open and not self.right_open:
         ctrl.mouse_scroll(self.scroll_sensitivity)
Ejemplo n.º 19
0
def scroll_up(m):
    ctrl.mouse_scroll(-200)
Ejemplo n.º 20
0
def scroll_down(m):
    ctrl.mouse_scroll(200)
Ejemplo n.º 21
0
def scrollMe():
    global scrollAmount
    if scrollAmount:
        ctrl.mouse_scroll(by_lines=False, y=scrollAmount)
Ejemplo n.º 22
0
 def custom_scroll_up(power: float = 50):
     """Scrolls with the mouse"""
     return ctrl.mouse_scroll(y=-power_to_amount(power), by_lines=False)