如何使鼠标点击特定(S)

发布于 2025-02-08 18:12:01 字数 363 浏览 0 评论 0原文

我正在尝试编写一个代码来控制鼠标点击位置。当前,我有代码按WIN +X。

我正在尝试弄清楚,尽管屏幕尺寸/屏幕数量,但要使鼠标点击准确地工作,需要做什么。


import keyboard
winx = keyboard.press_and_release("windows + x" )


当代码立场时,我需要的当前点击是点击系统。我需要在整个代码中单击其他内容,但目前弄清楚单击“系统”的最佳方法是目标。我尝试根据位置单击点击,但是由于多个屏幕/屏幕大小,这并不准确。

目前正在研究如何实现Pyautogui的图像识别将随着我的使用而更新。

I'm trying to write a code to control where the mouse clicks. currently, I have the code to press Win + X.

I am trying to figure out what would need to be done in order to have the mouse clicks work accurately despite the screen size/number of screens.


import keyboard
winx = keyboard.press_and_release("windows + x" )


As the code stands the current click I need is to click system. I will need to click other things throughout the full code but currently figuring out the best way to click "system" is the goal. I've tried clicking based on the location but because of multiple screens/ the size of the screens this isn't accurate.

Currently looking into how to implement pyautogui's image recognition will update as I go.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文