Python library
A client-server Python library for automating iOS devices. It only works with the iMouse XP version and requires dedicated hardware.
1.Quick
Before use, use pip to install the imouse-py package
pip install imouse-py
2.Use the API class basic interface
import imouse
from imouse.types import MouseSwipeParams
# Connect to the iMouse server (default address is localhost)
api = imouse.api(host="localhost") # Get the api instance. All interfaces provided by iMouse are called in the api instance.
# Perform mouse operations through the methods in the API class
api.mouse_click("FA:9E:10:3A:FE:E8", "", 100, 100) # Left click screen coordinates (100, 100)
api.mouse_swipe("FA:9E:10:3A:FE:E8", params=MouseSwipeParams( # Swipe up the screen from the bottom 10% to 90%
direction='up', #
len=0.9
))
3.Easier calling through helper class (recommended)
1.API provided by Console
Provides access to device management and global operations:
Device: Device Management
AirPlay: Screen projection connection and configuration
USB: imouse Hardware Management
Group: Group management
ImConfig: iMouse Global configuration management
User: iMouse Account Management
2.API provided by device
Provides control over individual devices:
Image: Device image operations, such as screenshots, image search, text recognition, etc.
KeyBoard: Keyboard operation
Mouse: Mouse Operation
Shortcut: Shortcut command operation
3.iMouse Event Handling
4.Configuring iMouse Log Output
Last updated