src/aoikhotkey/util/mouse_winos.py
def click_window_position(
        self,
        position,
        button_name='left',
        pre_click_wait=0,
        post_click_move=False,
        hwnd=None,
    ):
        """
        Click relative position in a window.

        :param position: Position tuple of (x_offset, y_offset).

        :param button_name: Button name.

        :param post_click_move: Whether restore old cursor position after \
            click.

        :param pre_click_wait: Pre-click wait time.

        :param hwnd: Window handle.

        :return: None.
        """
        # If window handle is not given
        if hwnd is None:
            # Get foreground window's handle
            hwnd = _GetForegroundWindow()

        # Get window's rectangle coordinates
        x_left, y_top, _, _ = self.get_window_rect(hwnd)

        # Get absolute x
        abs_x = x_left + position[0]

        # Get absolute y
        abs_y = y_top + position[1]

        # Click at the position
        self.click_screen_position(
            position=(abs_x, abs_y),
            button_name=button_name,
            pre_click_wait=pre_click_wait,
            post_click_move=post_click_move,
        )

        Click relative position in a window.

        :param position: Position tuple of (x_offset, y_offset).

        :param button_name: Button name.

        :param post_click_move: Whether restore old cursor position after \
            click.

        :param pre_click_wait: Pre-click wait time.

        :param hwnd: Window handle.

        :return: None.
        
Click relative position in a window.
Click relative position in a window .
def click_window_position(
        self,
        position,
        button_name='left',
        pre_click_wait=0,
        post_click_move=False,
        hwnd=None,
    ):
        if hwnd is None:
            hwnd = _GetForegroundWindow()
        x_left, y_top, _, _ = self.get_window_rect(hwnd)
        abs_x = x_left + position[0]
        abs_y = y_top + position[1]
        self.click_screen_position(
            position=(abs_x, abs_y),
            button_name=button_name,
            pre_click_wait=pre_click_wait,
            post_click_move=post_click_move,
        )
def click_window_position ( self , position , button_name = 'left' , pre_click_wait = 0 , post_click_move = False , hwnd = None , ) : if hwnd is None : hwnd = _GetForegroundWindow ( ) x_left , y_top , _ , _ = self . get_window_rect ( hwnd ) abs_x = x_left + position [ 0 ] abs_y = y_top + position [ 1 ] self . click_screen_position ( position = ( abs_x , abs_y ) , button_name = button_name , pre_click_wait = pre_click_wait , post_click_move = post_click_move , )
Click relative position in a window.
Click relative position in a window .
"""
        Click relative position in a window.

        :param position: Position tuple of (x_offset, y_offset).

        :param button_name: Button name.

        :param post_click_move: Whether restore old cursor position after \
            click.

        :param pre_click_wait: Pre-click wait time.

        :param hwnd: Window handle.

        :return: None.
        """ # If window handle is not given # Get foreground window's handle # Get window's rectangle coordinates # Get absolute x # Get absolute y # Click at the position
None
self
position
Position tuple of (x_offset, y_offset).
Position tuple of ( x_offset y_offset ) .
button_name
None
pre_click_wait
Pre-click wait time.
Pre - click wait time .
post_click_move
Whether restore old cursor position after \
click.
Whether restore old cursor position after \ click .
hwnd
None