Sign in to follow this  
Followers 0
TheDanishDragon

Making a hotkey based on a random keyboard input

3 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

It is a possible solution(ty :) ), but still - not practical when gamming, since i will use it for gaming*

i'm looking for a more dynamic kind of script

/TheDanishDragon

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  
Followers 0