Very simple issue Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Nantes
Posts: 7
Joined: 16 Jun 2021, 21:19

Very simple issue

Post by Nantes » 16 Jun 2021, 21:34

First time using AHK and I don't have any programming knowledge. I read the tutorial as well as some other pages in the Help but none of them helped. My script is:

Code: Select all

::Çs::
   Send, ações
Return

::Ç::
   Send, ação
Return
This works to make it so that typing "Çs" by itself yields "ações", but not if it's within a word (e.g. variÇs -> variações, that doesn't work). I want to make it work when used within words I type as well, not just when "Çs" is by itself. It must also not prematurely detect Ç before seeing if I want to type the Ç or not, otherwise typing "variÇ" will yield "variação" before I have time to add the extra S to make it "variações" instead. I tried adding a wildcard in the form of *, as such:

Code: Select all

::*Çs::
   Send, ações
Return
But that doesn't work.

Thanks for your help!
Sally2Q
Posts: 43
Joined: 16 Jun 2021, 10:18

Re: Very simple issue  Topic is solved

Post by Sally2Q » 16 Jun 2021, 23:16

Code: Select all

:?*:Çs::ações
So that above was my original reply but then I remembered about the second part. So what I have below should do both now.

Code: Select all

 :?*:Ç::
 input, outputvar, v l1, 
 if (outputvar="s")
  send {BackSpace 1}ações
 else 
  send {BackSpace 1}ação
[Mod edit: [code][/code] tags added.]
Last edited by Sally2Q on 16 Jun 2021, 23:50, edited 1 time in total.
Sally2Q
Posts: 43
Joined: 16 Jun 2021, 10:18

Re: Very simple issue

Post by Sally2Q » 16 Jun 2021, 23:48

I sent a reply but after having edited it it it seems to be gone now for some reason IDK why.
gregster
Posts: 8921
Joined: 30 Sep 2013, 06:48

Re: Very simple issue

Post by gregster » 16 Jun 2021, 23:54

Sally2Q wrote:
16 Jun 2021, 23:48
I sent a reply but after having edited it it it seems to be gone now for some reason IDK why.
The messages of new users often need to be approved by a moderator.
If you edit an already approved message, it usually needs a re-approval (and will disappear until this is done).
Sorry for the inconvenience (it can take a bit of time sometimes), but a few bad actors forced us to add these hurdles, in order to ensure a safe forum experience for everyone.
These restrictions will be lifted gradually by the system when you are making more (approved) posts.
Nantes
Posts: 7
Joined: 16 Jun 2021, 21:19

Re: Very simple issue

Post by Nantes » 17 Jun 2021, 10:45

Thanks Sally, it seems to work perfectly. This is going to enhance my productivity so much. You rock!
Sally2Q
Posts: 43
Joined: 16 Jun 2021, 10:18

Re: Very simple issue

Post by Sally2Q » 19 Jun 2021, 02:24

Nantes wrote:
17 Jun 2021, 10:45
Thanks Sally, it seems to work perfectly. This is going to enhance my productivity so much. You rock!
You're welcome. :D :)
Post Reply

Return to “Ask for Help (v1)”