Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

opposite of _IsPressed??

$
0
0

So i understand _IsPressed and ive used it a few times before. Currently im trying to figure out how to do if any other key is pressed besides the one its looking for.

Plain Text         
#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Misc.au3> #include<String.au3> $Form1 = GUICreate("GUI", 401, 201, 723, 228) GUISetBkColor(0x0000FF) GUISetState(@SW_SHOW) Local $hDLL = DllOpen("user32.dll")   HotKeySet("{F2}", "Close")   $Password = "Hello"   Func Close()     Exit EndFunc   $Password = StringUpper($Password) $len = StringLen($Password) $array = StringSplit($Password, "") For $i = 1 to $len Step 1     $Hex = _StringToHex($array[$i])         Do             Sleep(100)         Until _IsPressed($Hex) Next ConsoleWrite("Outside the For Loop")  

currently, if you just mash the keyboard, you will eventually get the password correct since the For loop doesnt reset itself on an incorrect letter. eventually i would like it to put an * in the top left corner as a tooltip for every letter i type correctly. if i type it incorrectly too many times, it will run a count down as a tooltip in the top left corner. however im just trying to get the first part done which is the for loop resetting on an incorrect letter typed.


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>