Hotstring with a Space as the KeyWait Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
cabbagethunder
Posts: 21
Joined: 19 Feb 2020, 12:18

Hotstring with a Space as the KeyWait

Post by cabbagethunder » 06 Jul 2022, 14:24

Is it possible to use a hotstring to convert an abbreviation to all CAPS if I hit the spacebar, but then also convert the abbreviation to a phrase if I hit the spacebar again? I basically want both of these to work:

Code: Select all

::btw::BTW
::btw ::by the way
The first space would automatically capitalize the letters and the second space would convert the abbreviation to the phrase. I'd like to keep it as a hotstring instead of a sendinput so I don't have to manually specify the space because I might use Tab or Enter instead.

Any help is greatly appreciated!

User avatar
mikeyww
Posts: 26601
Joined: 09 Sep 2014, 18:38

Re: Hotstring with a Space as the KeyWait  Topic is solved

Post by mikeyww » 06 Jul 2022, 20:40

Code: Select all

:C:BTW ::by the way
#InputLevel 1
:C:btw::
Send BTW `
Return

cabbagethunder
Posts: 21
Joined: 19 Feb 2020, 12:18

Re: Hotstring with a Space as the KeyWait

Post by cabbagethunder » 07 Jul 2022, 15:48

Perfect, thank you!

cabbagethunder
Posts: 21
Joined: 19 Feb 2020, 12:18

Re: Hotstring with a Space as the KeyWait

Post by cabbagethunder » 12 Jul 2022, 10:18

My only issue with this is that the Enter key is being "eaten" for the lowercase conversion because of the Send versus the hotstring replacement in the uppercase conversion.

EDIT:
Just figured it out...I needed to add %A_EndChar%

Thanks again!
Last edited by cabbagethunder on 12 Jul 2022, 10:41, edited 1 time in total.

User avatar
mikeyww
Posts: 26601
Joined: 09 Sep 2014, 18:38

Re: Hotstring with a Space as the KeyWait

Post by mikeyww » 12 Jul 2022, 10:34

Code: Select all

:C:BTW ::by the way
#InputLevel 1
:C:btw::
Send BTW%A_EndChar%
Return

cabbagethunder
Posts: 21
Joined: 19 Feb 2020, 12:18

Re: Hotstring with a Space as the KeyWait

Post by cabbagethunder » 12 Jul 2022, 10:41

Thank you for all your help! Pretty sure everything is perfect now.

Post Reply

Return to “Ask for Help (v1)”