HotKeySet("{F8}", "captureEsc") ;captureEsc中能传递参数 Func captureEsc($x) If $x>0 Then MsgBox(0,"提示", "成功") EndIf EndFunc
举报
调用的函数不能给函数加上参数. 它将会被忽略
HotKeySet("{F8}", "_TocaptureEsc") Dim $x = 0 Func _TocaptureEsc() $x = 1 captureEsc($x) EndFunc Func captureEsc($x) If $x >0 Then MsgBox(0,"提示", "成功") EndIf EndFunc
HotKeySet("{esc}", "_Esc") While 1 Sleep(100) WEnd Func _Esc() $x = InputBox('输入参数', '请输入一个数字', 3, '', '100', '50', @DesktopWidth/2 - 100, @DesktopHeight/2 -50, 3) If Not StringIsDigit($x) Then $x = '' captureEsc($x) EndFunc Func captureEsc($x = 0) If $x>0 Then MsgBox(0,"提示", "成功") EndIf EndFunc
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-3-3 03:50 , Processed in 0.086332 second(s), 23 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.