Moves the cursor in a straight line to (x, y) at a certain speed

    :param x: target x-ordinate
    :param y: target y-ordinate
    :param speed: pixel traversal rate
    :return: None

def move_line(x, y, speed = 1):
    """
    Moves the cursor in a straight line to (x, y) at a certain speed

    :param x: target x-ordinate
    :param y: target y-ordinate
    :param speed: pixel traversal rate
    :return: None
    """

    _x, _y = win32api.GetCursorPos()
    if x - _x:
        m = (y - _y) / (x - _x)
        c = y - (m * x)
        for a in range(_x, x + 1, speed) if _x < x else range(_x, x - 1, -speed):
            b = int(m * a + c)
            move(a, b)
            time.sleep(0.01)
    else:
        for b in range(_y, y + 1, speed) if _y <= y else range(_y, y - 1, -speed):
            move(x, b)
            time.sleep(0.01)
    move(x, y)