Abaixo está um script que copia o texto selecionado e depois cola o conteúdo modificado (depois de pesquisar e substituir). Eu acredito que isso é o que você quis dizer:
#x:: ;[Win]+[X]
;Empty the Clipboard.
Clipboard =
;Copy the select text to the Clipboard.
SendInput, ^c
;Wait for the Clipboard to fill.
ClipWait
;Perform the RegEx find and replace operation,
;where "ABC" is the whole-word we want to replace.
haystack := Clipboard
needle := "\b" . "ABC" . "\b"
replacement := "XYZ"
result := RegExReplace(haystack, needle, replacement)
;Empty the Clipboard
Clipboard =
;Copy the result to the Clipboard.
Clipboard := result
;Wait for the Clipboard to fill.
ClipWait
;-- Optional: --
;Send (paste) the contents of the new Clipboard.
SendInput, %Clipboard%
;Done!
return