我知道Alt+SpaceC可以关闭PowerShell,但是Alt+Space对我来说已经在使用了,我想将Alt+F4绑定到Alt+SpaceC,如何在AHK中实现?
你可以这样做:
!F4::Send !{Space}C
或者如果你想要PowerShell的一些特定的东西,那么你可以使用这个:
!F4::WinClose ahk_exe powershell.exe
或:
!F4::WinKill ahk_exe powershell.exe
WinClose
和WinKill
的区别在于,例如,当在记事本中编辑文件而不保存时,WinKill
会关闭该文件而不要求保存,WinClose
会要求保存。
下面的脚本允许使用Alt+F4或Ctrl+D关闭PowerShell:
#IfWinActive ahk_exe powershell.exe
!F4::
^d::WinClose
#IfWinActive