Jump to content

help plz :), Replace keystroke with ALT XXXX


buzz44
 Share

Recommended Posts

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

qq

Link to comment
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)

Link to comment
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

qq

Link to comment
Share on other sites

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)

Link to comment
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

qq

Link to comment
Share on other sites

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
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...