Jump to content
Sign in to follow this  
Vivvic

Hex value fot _ispressed

Recommended Posts

Vivvic

I am writing a launch program for a few keys for a friend of mine. But the keyboard has keyboard specific keys and I would like to find the hex values for those keys, how would I go about doing that?


[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Share this post


Link to post
Share on other sites
Vivvic

Hold the key and run something like this

For $x = 100 to 1000
  If _IsPressed($x) Then
      MsgBox(0, "", Hex($x,2))
  EndIf
Next

Edit: Added Hex().

Yes, I tried somthing like that but it dosnt seem to work, just tried yours and seem to get same results.>.<

EDIT: failed to mention it dosnt show any errors just dosnt show msg box either.

Edited by Vivvic

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Share this post


Link to post
Share on other sites
Vivvic

Ok thanks, I think I got it, will reply if I need anymore help.


[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Share this post


Link to post
Share on other sites
Zedna

I know it's late, but here is little testing/helper script:

#include <misc.au3>

While 1
  For $x = 1 to 256
    If _IsPressed($x) Then
        ConsoleWrite(Hex($x,2) & @LF)
    EndIf
  Next
  Sleep(10)
WEnd

Note: it must be terminated from tray menu by Exit command

Edited by Zedna

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.