 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
matzahboy Guest
|
Posted: Sun Oct 19, 2008 4:22 pm Post subject: How can I create a hotkey to insert spanish characters? |
|
|
I want to create a script that will do the following:
Ctrl + ' + a : Insert á
Ctrl + ' + e : Insert é
Ctrl + ' + i : Insert í
Ctrl + ' + o : Insert ó
Ctrl + ' + u : Insert ú
Ctrl + ' + n : Insert ñ
Ctrl + ' + ? : Insert ¿
How would I do this? |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 2212 Location: switzerland
|
Posted: Sun Oct 19, 2008 4:31 pm Post subject: |
|
|
http://www.autohotkey.com/forum/viewtopic.php?t=36175
| Code: | ;------------------------ SPANISH LETTERS ----------------------------------------
^a::
transform,S,chr,225
sendinput,%S%
return
^e::
transform,S,chr,233
sendinput,%S%
return
^i::
transform,S,chr,237
sendinput,%S%
return
^o::
transform,S,chr,243
sendinput,%S%
return
^u::
transform,S,chr,250
sendinput,%S%
return
^n::
transform,S,chr,241
sendinput,%S%
return
^?::
transform,S,chr,191
sendinput,%S%
return
|
|
|
| Back to top |
|
 |
Carlol
Joined: 14 Aug 2006 Posts: 163 Location: CPH
|
Posted: Sun Oct 19, 2008 4:40 pm Post subject: |
|
|
You could try this:
| Code: | :R*?:jja::á
:R*?:jje::é |
meaning you type jja and you get á etc.
Good luck  |
|
| Back to top |
|
 |
Krogdor
Joined: 18 Apr 2008 Posts: 1390 Location: The Interwebs
|
Posted: Sun Oct 19, 2008 4:50 pm Post subject: |
|
|
Adapting the code from your other thread, you could use:
| Code: | ^a::
^e::
^i::
^o::
^u::
^n::
^+/:: ; shift + / = ?, at least on my keyboard. change if different for you
a := "á", e := "é", i := "í", o := "ó", u := "ú", n := "ñ", ? := "¿"
ThisKey := ( A_ThisHotkey = "^+/" ? "?" : SubStr(A_ThisHotkey,2,1) )
If (GetKeyState("'","P"))
Send % %ThisKey%
Else
Send % A_ThisHotkey
Return |
Not tested. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|