Sign in to follow this  
Followers 0
buzz44

help plz :), Replace keystroke with ALT XXXX

10 posts in this topic

hello everyone, im new and have only started using autoit about a week ago :idiot: ,

i have a problem :lol:

i need to change the "-" key, so instead of displaying a "-" when u press it , it displays "ÿ". i know the"ÿ" is Send("{ALT 0255}") and "-" is Send("{-}") but i dont know the command to swap these keys, if possible at all,

i have tried the ControlSetKey command and have has no luck if that is the command to use any way.

can someone plz aid me in this.

Thankyou for your help :D


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

What you are wanting to do is similar to a HotKeySet() have you checked that function yet?

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

What you are wanting to do is similar to a HotKeySet() have you checked that function yet?

JS

<{POST_SNAPBACK}>

dear js,

yes i have checked that function but i couldnt get it to work, probibly because i didnt understand the inputs, ie, from help file

Sets a hotkey that calls a user function.

HotKeySet ( "key" [, "function"] )

i am not familiar, with the function input

i did try something like

HotKeySet ( "{-}", "hello")

Func hello

Send("{ALT 0255}")

EndFunc

But had no such luck JS


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

or trying searhing for these functions... StringReplace and StringSplit


FootbaG

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I just tested this and it works.

With both dash keys.

HotKeySet("-", "Y_Umlaut")
HotKeySet("{NUMPADSUB}", "Y_Umlaut")

While 1
   Sleep(100)
WEnd

Func Y_Umlaut()
   Send(Chr(255))
EndFunc
Edited by SlimShady

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

:idiot: <- ME Edited by this-is-me

Who else would I be?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

dear js,

yes i have checked that function but i couldnt get it to work, probibly because i didnt understand the inputs, ie, from help file

Sets a hotkey that calls a user function.

HotKeySet ( "key" [, "function"] )

i am not familiar, with the function input

i did try something like

HotKeySet ( "{-}", "hello")

Func hello

Send("{ALT 0255}")

EndFunc

But had no such luck JS

<{POST_SNAPBACK}>

Your syntax was a bit off. The only time you use the {} (curly brackets) is when you are sending keys. (Just a note :idiot:)

HotKeySet("-", "Hello")

Func Hello
   Send("{ALT 0255}")
EndFunc

Edit: See Slim's code he gave you the full complete script. Enjoy.

I hope that helps some,

JS

Edited by JSThePatriot

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

#8 ·  Posted (edited)

:idiot: <- ME Edited by this-is-me

Who else would I be?

Share this post


Link to post
Share on other sites

Thankyou very much, i just tried your code slimshady and it works fine :idiot: thankyou, i was wondering if u could also help me make coding so that, if u hit INSERT it will run the script and if u hit DELETE it will return the keys to there original value and quit, your inout would be much appreciated, and thankyou every1 else for your input :D


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

You can't run a file automatically.

To quit the following script, press DELETE. As you wanted.

Check and learn.

HotKeySet("-", "Y_Umlaut")
HotKeySet("{DELETE}", "Quit")
HotKeySet("{NUMPADSUB}", "Y_Umlaut")

While 1
  Sleep(100)
WEnd

Func Y_Umlaut()
  Send(Chr(255))
EndFunc

Func Quit()
   HotKeySet("-")
   HotKeySet("{DELETE}")
   HotKeySet("{NUMPADSUB}")
   EXIT
EndFunc

For future reference. See if you can use the help file.

If you have problems with it or if you don't understand something, post here.

Edited by SlimShady

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