Jump to content

Making a hotkey based on a random keyboard input


Recommended Posts

Hi i am new to AutoIt, i have some exp. from Autohotkey and thought it would be fun to try AutoIt. First ill improve a script that i made with Autohotkey, and here it goes :)

How to make a hotkey based on a random keyboard input? Lets say the conditions for the "loading" is to press shift+e+"random key from a-å(a-z)" and then saves the random key to a varriable?

Hope you get my problem, and just as much as i hope that you guys can sove it ^^

/TheDanishDragon

Edited by TheDanishDragon
Link to comment
Share on other sites

this works for an individual key as a hotkey.

$Key = InputBox("", "Enter a key for hotkey")
HotKeySet("{" & $key & "}", "Function1")

While 1
sleep(10)
WEnd

Func Function1()
MsgBox(0, "", "key pressed")
Exit
EndFunc
Edited by Tomb
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...