Typing certain text before opening a window with a shortcut

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ndiaz
Posts: 73
Joined: 10 Jan 2017, 17:05
Contact:

Typing certain text before opening a window with a shortcut

11 Nov 2017, 20:50

Ctrl+H opens the Find and Replace window in a program I'm using. After running a Replace All operation, the cursor is left at the very last replacement, but I want it to go back to its starting position. I plan on doing this with a simple trick: inserting GOBACK at my current cursor position before running a Replace All, then finding the GOBACK and deleting it.

I have this:

~^H::
Send GOBACK
return

The problem is that it inserts GOBACK into the Find field, i.e., it's typed after the Find and Replace window is opened. What I need is for it to be typed before the window is opened, so I'm guessing a pass-through is not what I need here, what can I do?

Thank you!
User avatar
Barney
Posts: 55
Joined: 28 May 2014, 20:03
Location: Germany

Re: Typing certain text before opening a window with a shortcut

11 Nov 2017, 23:15

try this:

Code: Select all

^h::
Send GOBACK^h
return
ndiaz
Posts: 73
Joined: 10 Jan 2017, 17:05
Contact:

Re: Typing certain text before opening a window with a shortcut

11 Nov 2017, 23:20

Thank you Barney, that sends "GOBACKGOBACKGOBACKGOBACKGOBACKGOBACKGOBACKGOBACKGOBACKGOBACKGOBACKGOBACK", etc. multiple times and never actually opens the Find and Replace window . I think I've found the solution: adding a $ in front of the hotkey, like this:

$^h::
Send GOBACK
Send ^h
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: doodles333 and 298 guests