Python/pyd calling
This article introduces how to use Python to call pyd files.
Download
Library
Run pip install clickmouse, wait for download to complete
Note
If you are in China, `pip` speed is slow, you can enter:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple clickmousebash
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple clickmousepyd
Go to github releases, find latest version with pyd version files.
Note
Please ensure downloading pyd files.
pyd files need to match python version, for example Python3.7 needs to download version with cp37.
free threaded version pyd files download needs to include t, such as 3.14t needs to download version with cp314t.
Function Library
click_mouse function:
- Definition:
python
def click_mouse(
button: Literal['left', 'right'],
delay: int,
time: int=1) -> None:- Parameters:
- button: Pressed key, optional
clickmouse.LEFTorclickmouse.RIGHT
- button: Pressed key, optional
- delay: Click delay
- time: Click count, default is 1 time, if
clickmouse.INFINITEthen infinite
- time: Click count, default is 1 time, if
Example
python
import clickmouse
clickMouse.click_mouse(clickmouse.LEFT, 1000, 10, 10) # Click left button 10 times, interval 1000ms, press interval 10ms