Jump to content
UBot Underground

Keypress Monitor Function


Recommended Posts

I've been trying to find a way to listen for a few different keys pressed - I saw that Advanced Ubot 1 used to have it but it doesn't appear to be there anymore, unless it's been renamed or I'm missing something obvious.

 

Is there another plugin that has key press monitoring in it? I want to run a few different functions based on what key was pressed. Thanks!

Link to post
Share on other sites

Is there another plugin that has key press monitoring in it? I want to run a few different functions based on what key was pressed. Thanks!

 

Are you looking to create keyboard shortcuts or do you want to monitor all key inputs? If you can give an example it would be helpful too.

Link to post
Share on other sites

Are you looking to create keyboard shortcuts or do you want to monitor all key inputs? If you can give an example it would be helpful too.

I'm just looking for it to detect whenever a key was pressed, maybe the letter F or C for example - and when it detects it run a define that checks what key was run and react appropriately.

 

So psuedo code would be (detect key press), set key to variable (i.e. #pressedKey), run define checkKeyPressed, then use elite ubot plugin to run a switch command - case 'f' - run commandF, case 'c', run commandC, etc.

 

If that makes sense.

 

Basically always have the bot listening for keys while it's running, and when certain keys are pressed run the correct command - not to do with Ubot hot keys or anything, just custom events defined in the code.

 

Basically, this functionality--it was shown as update 2.1.0.0 I believe for advanced ubot 1 but I can't seem to find it with the plugin enabled so not sure if it was removed:

 

http://www.screencast.com/t/b5Csrqodep

Edited by drewness
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...