Jump to content

[ASK]keyboard input


Recommended Posts

_IsPressed ?

no, _IsPressed does not wait for user key strokes, instead, it checks if user pressed the key specified in the key parameter,

what i want is, a way to wait for a key press and then get the value of the pressed key. again, like getch() method in C or C++

Link to comment
Share on other sites

maybe something like this??

#include <Misc.au3>
$x = 0
$var = 1
Do
if $var = 253 then $var = 1
if _IsPressed(hex($var)) = 1 then 
    $x = 1
Else
    $var = $var+1
EndIf
until $x = 1
i did try the same logic like yours, but there are times when key press timing doesn't meet the key value in the _IsPressed, causing user to press the key two times or more, any other idea??
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...