windows - Autoit run a function if key pressed three times in a limited amount of time -
i have code far:
#include <misc.au3> while true if _ispressed(57) sleep(100) if not _ispressed(57) sleep(100) if _ispressed(57) sleep(100) if not _ispressed(57) sleep(100) if _ispressed(57) sleep(100) if not _ispressed(57) up() endif endif endif endif endif endif wend func up() send("{w down}") sleep(10000) send("{w up}") sleep(500) endfunc the problem work times , temperamental. 1 know how create work every time rather times.
this looking for.
hotkeyset("a", "pressed") dim $i = 0, $pushtime = 1000 while 1 sleep(100) wend func pressed() $i += 1 sleep($pushtime) switch $i case 1 put(1) case 2 put(2) case 3 put(3) case 4 exit (0) endswitch $i = 0 endfunc ;==>pressed func put($y) msgbox(0, "func called: ", "nr: " & $y) endfunc ;==>put windows button keyboard autoit
No comments:
Post a Comment