Help with send Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
barbudo2005
Posts: 30
Joined: 03 Dec 2019, 20:39

Help with send

09 Jul 2021, 12:19

I made a script for my brother living in Canadá with an English keyboard but want to write Spanish.

Code: Select all


:*CB?:aa::
Sleep, 300
Send á
Sleep, 300
return

:*CB?:ee::
Sleep, 300
Send é
Sleep, 300
return

:*CB?:ii::
Sleep, 300
Send í
Sleep, 300
return

:*CB?:oo::
Sleep, 300
Send ó
Sleep, 300
return

:*CB?:uu::
Sleep, 300
Send ú
Sleep, 300
return

:*CB?:nn::
Sleep, 300
Send ñ
Sleep, 300
return

It works but in some cases like this not:

When I write pestaña it "writes" pestaá.
Wwhen I write the double "n" to write the ñ works but when I add the final "a" it delete the ñ and write instead á.

Why? How I can improve it?

Thanks a lot in advance.
User avatar
mikeyww
Posts: 26871
Joined: 09 Sep 2014, 18:38

Re: Help with send  Topic is solved

09 Jul 2021, 12:32

Code: Select all

:*C?:aa::á
:*C?:ee::é
:*C?:ii::í
:*C?:oo::ó
:*C?:uu::ú
:*C?:nn::ñ
barbudo2005
Posts: 30
Joined: 03 Dec 2019, 20:39

Re: Help with send

09 Jul 2021, 13:00

Thanks a lot.
barbudo2005
Posts: 30
Joined: 03 Dec 2019, 20:39

Re: Help with send

28 Sep 2021, 10:42

mikeyww:

My brother has a problem because he writes in Spanish AND English so when he writes "book" result "bók".

So an idea is the following logic:

If I write two "o" and the following letter is an "o" then write "oo". If the third letter is not an "o" then write "ó".

Could you be so kind to help me with this idea?

Thank you in advance
barbudo2005
Posts: 30
Joined: 03 Dec 2019, 20:39

Re: Help with send

28 Sep 2021, 18:52

mikeyww:

Somethig like this:

Code: Select all

:*C?:oo::
Input, letra, L1
If (letra = "o")
Send oo
else
Send ó
Send %letra%		
return
But not works well. Why?
User avatar
mikeyww
Posts: 26871
Joined: 09 Sep 2014, 18:38

Re: Help with send

28 Sep 2021, 19:55

Code: Select all

:*C?B0:oo::
Input, letra, L1
Send % letra = "o" ? "" : "`b`bó" letra
Return
Explained: BlocksElse
barbudo2005
Posts: 30
Joined: 03 Dec 2019, 20:39

Re: Help with send

29 Sep 2021, 08:11

Thank you very much.

It works very well but fails in "cómo" when click space.
barbudo2005
Posts: 30
Joined: 03 Dec 2019, 20:39

Re: Help with send

29 Sep 2021, 08:55

Sorry, but it was another script that made it fail.

My script with { also works well.

Code: Select all

:*C?:oo::
Input, letra, L1
If (letra = "o")
{
Send oo
}
else
{
Send ó
Send %letra%	
}
return
User avatar
mikeyww
Posts: 26871
Joined: 09 Sep 2014, 18:38

Re: Help with send

29 Sep 2021, 10:09

Sure, it's fine that way, too. This is the shortcut, but it makes no difference.

Code: Select all

:*C?:oo::
Input, letra, L1
Send % letra = "o" ? "oo" : "ó" letra
Return
Another way to write (same effect):

Code: Select all

:*C?:oo::
Input, letra, L1
If (letra = "o")
     Send oo
Else Send ó%letra%
Return
barbudo2005
Posts: 30
Joined: 03 Dec 2019, 20:39

Re: Help with send

29 Sep 2021, 12:06

Thank you very much.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: roeleboele and 384 guests