String 自动热键-按下PrintScreen按钮后收听字符串?
我想让我的脚本在按下PrintScreen按钮后监听我将输入的字符串。例如,如果我按下PrintScreen按钮,然后键入“paint”,它应该会打开MSPaint。如果我输入“photoshop”,它会打开photoshop。。这可能吗 这是我的尝试,一次彻底的失败(顺便说一句,我对AHK是新手……)String 自动热键-按下PrintScreen按钮后收听字符串?,string,paint,autohotkey,photoshop,printscreen,String,Paint,Autohotkey,Photoshop,Printscreen,我想让我的脚本在按下PrintScreen按钮后监听我将输入的字符串。例如,如果我按下PrintScreen按钮,然后键入“paint”,它应该会打开MSPaint。如果我输入“photoshop”,它会打开photoshop。。这可能吗 这是我的尝试,一次彻底的失败(顺便说一句,我对AHK是新手……) 您是对的,printScreen::paint::不是有效的自动热键代码 改为使用Ahk的命令-该命令用于侦听字符串/字符: ~PrintScreen:: input, outputSt
您是对的,
printScreen::paint::
不是有效的自动热键代码
改为使用Ahk的命令-该命令用于侦听字符串/字符:
~PrintScreen::
input, outputString, i, {enter}.{esc}{tab}
if outputstring = paint
{
Run, MSPaint
WinWaitActive, Untitled - Paint
Send, ^v
} else if outputstring = photoshop
{
Run, Photoshop
WinWaitActive, Adobe Photoshop CS6
Send, ^v
}
return
不过,我鼓励您自己查看input的选项,以便根据自己的需要进行调整。祝你好运非常感谢,我应该查一下输入命令我猜:p
~PrintScreen::
input, outputString, i, {enter}.{esc}{tab}
if outputstring = paint
{
Run, MSPaint
WinWaitActive, Untitled - Paint
Send, ^v
} else if outputstring = photoshop
{
Run, Photoshop
WinWaitActive, Adobe Photoshop CS6
Send, ^v
}
return