AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How can I create a hotkey to insert spanish characters?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
matzahboy
Guest





PostPosted: Sun Oct 19, 2008 4:22 pm    Post subject: How can I create a hotkey to insert spanish characters? Reply with quote

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

PostPosted: Sun Oct 19, 2008 4:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Carlol



Joined: 14 Aug 2006
Posts: 163
Location: CPH

PostPosted: Sun Oct 19, 2008 4:40 pm    Post subject: Reply with quote

You could try this:

Code:
:R*?:jja::á
:R*?:jje::é


meaning you type jja and you get á etc.

Good luck Very Happy
Back to top
View user's profile Send private message
Krogdor



Joined: 18 Apr 2008
Posts: 1390
Location: The Interwebs

PostPosted: Sun Oct 19, 2008 4:50 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group