Sign in to follow this  
Followers 0
Markken

Need help to write code

3 posts in this topic

Hi, Everybody....

I love Autoit, but I am lack of knowledge of its language. Please anybody help me to write code; I am going to describe here what I want.........

It can be called Key Mapping (Not Replacing). It means if I press a key, another key also performs. For example; when I press Key "1", Key "q" also performs at the same time.

The keys below are the keys mapping that I want:

"1" mapping with "q"

"2" mapping with "w"

"3" mapping with "e"

"4" mapping with "r"

Please save it as *.au3 that I am be able to add more keys or edit them.......

Thanks

Share this post


Link to post
Share on other sites



Hi, Everybody....

I love Autoit, but I am lack of knowledge of its language. Please anybody help me to write code; I am going to describe here what I want.........

It can be called Key Mapping (Not Replacing). It means if I press a key, another key also performs. For example; when I press Key "1", Key "q" also performs at the same time.

The keys below are the keys mapping that I want:

"1" mapping with "q"

"2" mapping with "w"

"3" mapping with "e"

"4" mapping with "r"

Please save it as *.au3 that I am be able to add more keys or edit them.......

Thanks

Searching the forum, I found this,

http://www.autoitscript.com/forum/index.ph...st&p=502559

So to get you started

#NoTrayIcon
#include "misc.au3"

_Singleton(@ScriptName)

; set hotkeys
HotKeySet("{ESC}", "Terminate")


HotKeySet(Chr(Asc('1')), "No1")

While GUIGetMsg() <> -3
    Sleep(1000)   
WEnd

; send broken alphabets
Func No1()
    HotKeySet("1")
    Send("1")   
    Send("q")
    HotKeySet(Chr(Asc('1')), "No1")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Press 1 and 1q appears that's all I've done. And press Esc to exit.

Good luck.

Share this post


Link to post
Share on other sites

Wow, That's what I want. Thank you so much.-muttley

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