Jump to content

Quick Question


Recommended Posts

What did you use?

I was going to say use something with this statement, but I didn't get it working yet:

$ret = DllCall("user32.dll","short","GetAsyncKeyState","int", "55")

<{POST_SNAPBACK}>

LoL... overly complicated, but probably a good learning experience anyway. I'd be interested in seeing if you can get it done with a DLL call....that way you don't have to tie up a hotkey with "HotKeySet"

:)

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

How about this:

$initial = DllCall("user32.dll","short","GetKeyState","int", 0x55)
While 1
    $ret = DllCall("user32.dll","short","GetKeyState","int", 0x55)
    If NOT ($ret[0] = $initial[0]) Then 
       ; Do what you want here!!!
        Exit(0)
    EndIf
WEnd

Now you don't have to tie up the HotKey :)

Edited by automagician
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...