gpt4 book ai didi

unable to simulate a click with win32api in bluestacks 5(无法在BlueStacks5中使用win32api模拟点击)

转载 作者:bug小助手 更新时间:2023-10-25 14:44:55 25 4
gpt4 key购买 nike



I just tried a normal leftclick function.

我刚刚尝试了一个普通的左键点击功能。


def leftClick(x,y):
win32api.SetCursorPos((x,y))
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0)
time.sleep(.1)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0)

Set cursor position works fine. But left down/up doesn't work.

设置光标位置工作正常。但左向下/上向不起作用。


更多回答

It looks okay to me. More information about any errors you are getting or more code you have related to this would be helpful. As of right now, the only thing I can think of to recommend is potentially trying pyautogui instead. Import it, then use pyautogui.click(x, y) and report back.

在我看来还可以。有关您收到的任何错误的更多信息或与此相关的更多代码将是有帮助的。到目前为止,我唯一能想到的建议就是潜在地尝试一下pyaugui。导入它,然后使用pyaugui。单击(x,y)并返回报告。

Basically, I forgot that the program being automated was open with administrative privileges. So it is not possible for win32api to access the admin window without having these rights.

基本上,我忘记了正在自动化的程序是以管理权限打开的。因此,在没有这些权限的情况下,win32api无法访问管理窗口。

优秀答案推荐
更多回答

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com