举报
#include <Misc.au3> Global $time = 0 HotKeySet("{ESC}", "quit") While 1 If _IsPressed(55) = 1 Then While 1 If _IsPressed(55) <> 1 Then $time = 0 ExitLoop EndIf If $time = 3 Then ToolTip("") MsgBox(0, 0,"U键长按了3秒") ExitLoop EndIf Sleep(1000) $time += 1 ToolTip("U 键按了 "& $time &" 秒,按ESC键退出") WEnd EndIf ToolTip("长按 U 键测试,按ESC键退出") WEnd Func quit() Exit EndFunc
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-2-22 16:44 , Processed in 0.075855 second(s), 23 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.