gpt4 book ai didi

pywinauto - 使用 pywinauto 按键

转载 作者:行者123 更新时间:2023-12-04 14:24:28 26 4
gpt4 key购买 nike

非常直接的问题。

只想按一个键盘键。像输入一样,使用 pywin auto。我不想在任何应用程序窗口的上下文中按下它。

只是键盘键的原始按键,如 a 或 enter 或退格。

最佳答案

只需使用

# from pywinauto.SendKeysCtypes import SendKeys # old for pywinauto==0.5.x
from pywinauto.keyboard import send_keys

send_keys('some text{ENTER 2}some more textt{BACKSPACE}', with_spaces=True)

文档:
https://pywinauto.readthedocs.io/en/latest/code/pywinauto.keyboard.html

附言 SendKeysCtypes更名为 keyboard在 pywinauto 0.6.0+ 中。

关于pywinauto - 使用 pywinauto 按键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40265705/

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