### Understanding Function Signatures and Parameters Source: https://autox-doc.vercel.app/docs/rhino/documentation/index Demonstrates how to read function signatures, identify parameters (required and optional), and understand parameter types and descriptions, using the `input` function as an example. ```APIDOC ## How to Read This Documentation ### `input([i, ]text)` - **`i`** {number} - Optional - Specifies the index of the input field (0-based) to type into. If omitted, input will be directed to the first input field. - **`text`** {string} - Required - The text to be entered into the input field. **Example Usage:** ```javascript // Enters 'Hello World' into the second input field on the screen. input(1, "Hello World"); // Enters 'Hey there' into the first input field on the screen. input("Hey there"); ``` **Note:** When calling functions with optional parameters, do not include the brackets `[]` or the equals sign `=`. ``` -------------------------------- ### Interpreting Functions with Optional Parameters and Defaults Source: https://autox-doc.vercel.app/docs/rhino/documentation/index Explains how to interpret function signatures that include optional parameters with default values, using the `images.detectsColor` function as an example. ```APIDOC ## `images.detectsColor(image, color, x, y[, threshold = 16, algorithm = "diff"])` - **`image`** {Image} - Required - The image object to perform color detection on. - **`color`** {number | string} - Required - The color to detect (can be a number or a hex string like '#RRGGBB'). - **`x`** {number} - Required - The x-coordinate of the detection area. - **`y`** {number} - Required - The y-coordinate of the detection area. - **`threshold`** {number} - Optional - The similarity threshold for color matching (0-255). Defaults to 16. - **`algorithm`** {string} - Optional - The color matching algorithm. Options include: - `equal`: Exact color match. - `diff`: Match if the sum of absolute differences in R, G, B is less than `threshold`. - `rgb`: Match if the RGB Euclidean distance is less than or equal to `threshold`. - `rgb`: Weighted RGB Euclidean distance match (LAB Delta E). - `hs`: HS Euclidean distance match (Hue in HSV space). **Example Usage:** ```javascript // Detects color with default threshold and algorithm. images.detectsColor(captureScreen(), "#112233", 100, 200); // Equivalent to the above if default values are used: // images.detectsColor(captureScreen(), "#112233", 100, 200, 16, "diff"); // Detects color with a custom threshold and default algorithm. images.detectsColor(captureScreen(), "#112233", 100, 200, 64); // Equivalent to the above if default algorithm is used: // images.detectsColor(captureScreen(), "#112233", 100, 200, 64, "diff"); ``` **Note:** When calling functions with optional parameters and default values, do not include the brackets `[]` or the equals sign `=`. ``` -------------------------------- ### Detects Color Function Usage in AutoX.js Source: https://autox-doc.vercel.app/docs/rhino/documentation/index Illustrates the use of the 'images.detectsColor' function in AutoX.js for color detection within an image. It shows how to specify image, color, coordinates, and optional parameters like threshold and algorithm. The examples highlight the function's flexibility with default values for threshold and algorithm. ```javascript images.detectsColor(captureScreen(), "#112233", 100, 200); //相当于 images.detectsColor(captureScreen(), "#112233", 100, 200, 16, "rgb"); ``` ```javascript images.detectsColor(captureScreen(), "#112233", 100, 200, 64); //相当于 images.detectsColor(captureScreen(), "#112233", 100, 200, 64, "rgb"); ``` -------------------------------- ### Input Function Usage in AutoX.js Source: https://autox-doc.vercel.app/docs/rhino/documentation/index Demonstrates the usage of the 'input' function in AutoX.js for entering text into input fields. It shows how to specify an index for a particular input field or input text into all available fields if no index is provided. The function accepts an optional numerical index and a string of text to be entered. ```javascript //执行这个语句会在屏幕上的第2个输入框处输入"啦啦啦"。 input(1, "啦啦啦"); ``` ```javascript //这个语句会在屏幕上所有输入框输入"嘿嘿嘿"。 input("嘿嘿嘿"); ``` -------------------------------- ### API Stability Levels Source: https://autox-doc.vercel.app/docs/rhino/documentation/index Explains the different stability levels used in the AutoX.js API documentation: Deprecated, Experimental, and Stable. ```APIDOC ## API Stability AutoX.js is under active development, and APIs may change. Stability markers indicate the current status of modules and functions: ### Deprecated Deprecated functions, modules, or features will be removed or changed in future updates. Avoid using them in your scripts to prevent unexpected issues. ### Experimental Experimental functions, modules, or features may change or be removed in future updates. Use them with caution, or only for temporary or trial purposes. ### Stable Stable functions, modules, or features are unlikely to change in future updates and will maintain backward compatibility. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.