Jump to content

Recommended Posts

Posted

I have a program that loops really fast non-stop. I want the program to slow down to a crawl when nothing has been typed for a period of time. I know I can do something with the Timer functions with the mouse position to slow it down. I'm stumped with the keyboard part though. Can you pull the button being sent with the driver, or some other function? I don't think IsPressed will work for me.

INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
Posted

I think _IsPressed() would work, you just have to check enough keys. This in fact checks everything - all keys and mouse buttons.

#include <misc.au3>

HotKeySet ("{ESC}", "quitme")

While 1
    For $i = 1 To 255
        If _IsPressed (Hex ($i)) Then
            MsgBox (0, "pressed", $i)
        EndIf
    Next
WEnd

Func quitme()
    Exit
EndFunc
Posted

I know you're right Larry, but I just did it to show that it could be done with _ispressed, and I don't really know a better way (I've tried something, but it didn't work out for me). If you'd like to say the way you'd do it (or PM me if posting it would be bad), that'd be really cool.

  • Moderators
Posted

ancient chinese secret...

Lar.

I remember that commercial... Wasn't that a 'Tide' Commercial? :lmao:

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

GUIRegisterMsg + dll WH_KEYBOARD hook... but that's a key logger... ancient chinese secret...

Lar.

Could I get an example of the dllcall that uses GetAsyncKeyState? I believe it is in one of lazycats UDFs I want it so that I can try pluging in SendInput into it to see what I might get.

Thank you.

INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

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
×
×
  • Create New...