How to press “Ctrl+Shift+Q” in AutoIt

笑着哭i 提交于 2019-11-26 18:42:07

问题


I have an application which has a shortcut key Ctrl + Shift + Q to quit it. I want to press Ctrl + Shift + Q via AutoIt to exit my application. I tried it as below:

Send("{LCTRL} {LSHIFT} Q")

and

ControlSend("{LCTRL} {LSHIFT} Q")

But none of them did work. Please guide me to do it the right way.


回答1:


You want something like:

Send("{CTRLDOWN}{SHIFTDOWN}q{CTRLUP}{SHIFTUP}")

What you are sending presses the keys individually in sequence, rather than chaining them together. Hope that helps!

Source: www.autoitscript.com




回答2:


Please use the below option

Send("^+{F}")

The keylists are available in the AutoIt Help link, take a look at Send Auto Keys List



来源:https://stackoverflow.com/questions/30597457/how-to-press-ctrlshiftq-in-autoit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!