Jump to content
Sign in to follow this  
jWalker

Assign Hotkey

Recommended Posts

jWalker

Hey!

I am making a reaction game.

A light is red and after a random time it gets green and you have to push a key. the fastest one wins.

My question is: I want to let the user pick a desired key. So A SplashText comes up and says: Player1 - please pick a key.

Then u press a key and Player 2 must pick a key.

Any way to solute this?

Share this post


Link to post
Share on other sites
jWalker

Yeah i did that but is there no way to do it without?

Share this post


Link to post
Share on other sites
rcmaehl

Yes, however the only solution I can think of would be hooking userdll32 and getting a keypress from that. Which is more in the advanced end. Although, you could do a whole lot of _IsPressed() although it won't be pretty.

EDIT: s/Basically/Although,/

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Share this post


Link to post
Share on other sites
sleepydvdr

I think this could be useful for you:


#include <ByteMe.au3>

Share this post


Link to post
Share on other sites
jWalker

;) No way! No keylogger... I just want to keep this game as simple as possible.

My little cousin was in Bremen, Germany in the "Universum"; it is a Museum - but you can interact with the things shown there.

There was a Human section where your reaction was tested with a little buzzer and a red block... if the red block comes into the picture you had to press the buzzer.

He played this for abt 10 minutes until we finally got him off that :)

Now he asked me if i couldnt programm this for him and his friends to show and play it with his friends...

So i decided to keep it as simple as possible...

Sleepy: Hmm seems like this is some sort of gui that has to be used in this UDF

rcmaehl: _IsPressed for so much keys isnt that good ;) as you said its not that pretty...

So then ill have to look how i make this if nobody has another idea :graduated:

Edited by jWalker

Share this post


Link to post
Share on other sites
AdmiralAlkex

If you're using HotKeySet() then the easiest would be one of those HotKey-input-controls, like the one sleepydvdr linked to. There are others if you don't like that specific one, just search for hotkey (or maybe hotkey*), titles only, in the examples forum.

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  

×