import win32com.client
shell = win32com.client.Dispatch("WScript.Shell")
shell.AppActivate("Command Prompt")
shell.SendKeys("%{ }") # This
#shell.SendKeys("% ") # and this
#shell.SendKeys("%( )") # and this is not working
WScript 不是强制性的,您可以提出任何编程解决方案。
需要扫描码(56 和 57):
from win32api import *
from win32con import *
keybd_event(VK_LMENU, 56, 0, 0)
keybd_event(VK_SPACE, 57, 0, 0)
keybd_event(VK_SPACE, 57, KEYEVENTF_KEYUP, 0)
keybd_event(VK_LMENU, 56, KEYEVENTF_KEYUP, 0)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)