Sign in to follow this  
Followers 0
Misha

A Way To Hotkeyset Keyboard

6 posts in this topic

I am wondering if there is a way to hotkeyset all of the keyboard prehaps useing an array and a for?

Please assist

Share this post


Link to post
Share on other sites



I am wondering if there is a way to hotkeyset all of the keyboard prehaps useing an array and a for?

Please assist

HI,

right from help.

Up to 64 simultaneous hotkeys per script may be registered.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

HI,

right from help.

Up to 64 simultaneous hotkeys per script may be registered.

So long,

Mega

I`ve just been trying to do the same thing http://www.autoitscript.com/forum/index.php?showtopic=25787

Anyone know how to assign functions with variables?


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

Well I meant the letters only not the Print screens and such

Share this post


Link to post
Share on other sites

If you only want the letters then the following will work, lemme know if u need anything else

HotKeySet( "{Esc}", "exit_now" )

$Keys = "abc"

$temp = $Keys

;assign the hotkeys
While StringLen( $temp) <> 0
    $curr_char = StringLeft( $temp, 1 )
    HotKeySet( $curr_char, $curr_char )
    $temp = StringTrimLeft( $temp, 1 )  
WEnd

;wait for hotkeys to be pressed
while 1
    Sleep( 100 )    
wend

;hotkey functions
Func a()
    MsgBox( 0, "", "a" )
EndFunc

Func b()
    MsgBox( 0, "", "b" )
EndFunc

Func c()
    MsgBox( 0, "", "c" )
EndFunc

;exit function for hotkey "Esc"
Func exit_now()
    Exit
EndFunc

You can jsut changed the characters in $Keys to add more functionality and then change the code in the functions to do whatever you want them to do. It is jsut simple msgbox() now to show it works.


_____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper

Share this post


Link to post
Share on other sites

Or if you would like something a bit more useful would be...

_IsPressed() by Ezzetabi. It is actually in the Beta helpfile now. I dont know when it got included, but I am glad it did!

Hope it helps,

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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