IanN1990 Posted February 4, 2012 Share Posted February 4, 2012 Random question _IsPressed can be used to detect when a button is pressed, but is there any way to make it run only when a key is detected #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep(250) For $iX = 1 To 254 If _IsPressed(Hex($iX), $dll) Then ConsoleWrite("A") EndIf Next WEnd DllClose($dll) Is an example but i was wondering if there was any better way? "as i dont like the idea of a 1-254 loop every 250 mili seconds Link to comment Share on other sites More sharing options...
Valik Posted February 5, 2012 Share Posted February 5, 2012 It's a polling function. End thread. Link to comment Share on other sites More sharing options...
Recommended Posts