Jump to content

Capturing and Saving a Keypress


Eru
 Share

Recommended Posts

I have a script that uses hotkeys that I want to be customized by the end user.

Basically right now, it opens using default keys and you can press a certain key to open up a GUI that lets you assign your own hotkeys with input boxes. Right now, the script works if you type in the autoit code for a hotkey. (e.g. "^{End}")

What I'd like to do is have the person who's setting up the script to put their cursor in the GUI's input box and press a hotkey combination. (CTRL and or SHIFT and or ALT + Some Key)

I'm not seeing a function that does anything like that in the functions library and I'm wondering if it is even possible, what with keyloggers being a problem now-a-days.

Point me in a direction please. :whistle:

Thanks!

Link to comment
Share on other sites

_IsPressed will work. It isn't in the help file, but look in Misc.au3 for information. I haven't had much experience with this UDF.. one of the more experienced people could probably give more help than me. :whistle:

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Link to comment
Share on other sites

I have done this in one of my programs. It requires an array of scancodes corresponding to each key on the standard keyboard. Then use _IsPressed() and return the index from the array of scancodes. Send me a private message if you need more info, I wont post anything here. Btw for convience I added a text file in INI format with all the scancodes, check it out.

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

_IsPressed will work. It isn't in the help file, but look in Misc.au3 for information. I haven't had much experience with this UDF.. one of the more experienced people could probably give more help than me. :whistle:

I was pretty sure it was in the helpfile? Shmeh!

Link to comment
Share on other sites

Oops! It is.. hehe.. I feel really dumb now. :whistle:

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

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...