hotkey replacement, but with two of same letter Topic is solved
-
- Posts: 43
- Joined: 20 Apr 2020, 14:29
hotkey replacement, but with two of same letter
would like "ss" (no quotes) to be replaced with s: {backspace}
::ss::s:
works, but gives me a space
:*:ss:s:
doesn't work because it messes up words like pass and crass
Basically, I want to open the windows Run box and type ss, get it automatically changed to s: with no spaces, so that I can immediately follow it with a \ if I want the slash. Sometimes I do, sometimes I don't.
::ss::s:
works, but gives me a space
:*:ss:s:
doesn't work because it messes up words like pass and crass
Basically, I want to open the windows Run box and type ss, get it automatically changed to s: with no spaces, so that I can immediately follow it with a \ if I want the slash. Sometimes I do, sometimes I don't.
Re: hotkey replacement, but with two of same letter
Code: Select all
#Requires AutoHotkey v1.1.33
#If WinActive("ahk_class #32770 ahk_exe explorer.exe")
:*:ss::s: {BS}
#If
Code: Select all
#Requires AutoHotkey v2.0
#HotIf WinActive("ahk_class #32770 ahk_exe explorer.exe")
:*:ss::s: {BS}
#HotIf
-
- Posts: 43
- Joined: 20 Apr 2020, 14:29
Re: hotkey replacement, but with two of same letter
Hi, I tried this before, but it keeps the space.mikeyww wrote: ↑02 Feb 2023, 10:29Code: Select all
#Requires AutoHotkey v1.1.33 #If WinActive("ahk_class #32770 ahk_exe explorer.exe") :*:ss::s: {BS} #If
As written, ss{space} gives me "s: "
So I tried adding two {BS}
Then, ss{space} gives me "S "
The run box was just an example. I'd like to use it everywhere. I don't want to use :*:, but :: requires the spacebar to fire it, but I don't want the resultant space.
Re: hotkey replacement, but with two of same letter
When I tested the exact script that I posted, it does not keep the space. Use only this code, no other code, no other scripts.
-
- Posts: 43
- Joined: 20 Apr 2020, 14:29
Re: hotkey replacement, but with two of same letter
I got it.
Follow-up question. If ever I do want to have a double S typed and displayed, what's the easiest way to get it, while also keeping that hotkey running?
Re: hotkey replacement, but with two of same letter
The question is how you would like to get it, what you would like to do, to yield that result.
-
- Posts: 43
- Joined: 20 Apr 2020, 14:29
Re: hotkey replacement, but with two of same letter
You have provided a description of the problem, but not an answer to the question. I suggest that you provide a written description of what you would like to type to get output #1, and what you would like to type differently to get output #2.
-
- Posts: 43
- Joined: 20 Apr 2020, 14:29
Re: hotkey replacement, but with two of same letter
Hi, instead of typing "ss" to get "s:" I would like:
to type "ss[space]" to get exactly "s:\" (this is a bit different than what I originally wrote, but is what I want now)
But if ever I need to type "ssp" I would like to be able to do so.
Re: hotkey replacement, but with two of same letter Topic is solved
Code: Select all
#Requires AutoHotkey v1.1.33
:O:ss::s:\
-
- Posts: 43
- Joined: 20 Apr 2020, 14:29
Re: hotkey replacement, but with two of same letter
YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS!