我想在VBA脚本中使用快捷键而不是单击对象。所以我使用下面的代码(^ F6)按“ctrl + F6”。但它不起作用并显示语法错误。
SAPGuiSession("Session").SAPGuiWindow("Aufteiler anlegen : Einstieg").SendKey ^F6
但是,“SHIFT + F6”+ F6完美运行。有人能想出来吗?
QTP不会将^
转换为控制,而是使用special constant micCtrl
。这样的东西可能有效(未经测试)
With SAPGuiSession("Session").SAPGuiWindow("Aufteiler anlegen : Einstieg")
.SendKey micCtrlDown
.SendKey micF6
.SendKey micCtrlUp
End With