怎么说当你按下 ahk 中的按钮时会发生什么?
how to say what happens when you press a button in ahk?
如何在按下特定按钮时执行特定功能?
例如,有一个名为“ef”的变量。所以现在,如果我按 ctrl+alt+;,将弹出一个消息框,其中包含中止、重试和忽略按钮。所以,如果我按下 abort,变量“ef”的值将变为 efabort。如果我按重试,它的值将变为 efretry。否则,如果我按 Ignore,ef 的值将变为 efignore。
那可能吗?如果是,请留下包含代码的答案。
从这个开始:
ef = 000
<!<^;::
MsgBox,2,set ef,what do you want to set ef to?
有答案吗?谢谢
A variable 是一个值的占位符。该值可以更改,但是一个变量一次只能保存一个值。
要在变量中存储值,建议使用使用colon-equal运算符(:=)的表达式方法。
ef := "" ; initialize the variable in the auto-execute section (top of the script)
MsgBox,2,set ef,what do you want to set ef to?
IfMsgBox Abort
ef := "efabort"
IfMsgBox Retry
ef := "efretry"
IfMsgBox Ignore
ef := "efignore"
; To return a given value of a variable within commands, you need to enclose the variable in percent signs
MsgBox % "The value in the variable ef is now " . ef . "."
如何在按下特定按钮时执行特定功能?
例如,有一个名为“ef”的变量。所以现在,如果我按 ctrl+alt+;,将弹出一个消息框,其中包含中止、重试和忽略按钮。所以,如果我按下 abort,变量“ef”的值将变为 efabort。如果我按重试,它的值将变为 efretry。否则,如果我按 Ignore,ef 的值将变为 efignore。
那可能吗?如果是,请留下包含代码的答案。
从这个开始:
ef = 000
<!<^;::
MsgBox,2,set ef,what do you want to set ef to?
有答案吗?谢谢
A variable 是一个值的占位符。该值可以更改,但是一个变量一次只能保存一个值。
要在变量中存储值,建议使用使用colon-equal运算符(:=)的表达式方法。
ef := "" ; initialize the variable in the auto-execute section (top of the script)
MsgBox,2,set ef,what do you want to set ef to?
IfMsgBox Abort
ef := "efabort"
IfMsgBox Retry
ef := "efretry"
IfMsgBox Ignore
ef := "efignore"
; To return a given value of a variable within commands, you need to enclose the variable in percent signs
MsgBox % "The value in the variable ef is now " . ef . "."