我从 pip 安装了最后一个 pywinauto 模块。
我不知道如何使用 Check()、UnCheck()、GetCheckState() 方法。
这是我非常简单的代码示例。
from pywinauto import application
# Start the madvr settings application.
app = application.Application()
app.start_(r'C:\Program Files\LAV Filters\x86\madVR\madHcCtrl.exe editLocalSettingsDontWait')
# Handle the madvr settings window.
madvr = app.window_(title_re="madVR.*")
# Enable the smooth motion tab.
madvr.TreeView.GetItem(r'\rendering\smooth motion').Click()
# Check the smooth motion checkbox.
madvr.TCheckBox.Check()
如果我使用 Click() 方法,它可以工作,但这不是我想要的。
madvr.TCheckBox.Click()
如果复选框已被选中,则取消选中它。
为什么我不能使用 Check() 方法?
我尝试了 Uncheck() 和 GetCheckState() 方法,它们也没有工作。