Reputation: 21
I'm new to Autohotkey, tried to make a macro to:
Copy selection
Paste it in Notepad++
Playback Notepad++ macro (for formatting) shortcut: Ctrl+Shift+B
Copy all the edited text
Paste in Firefox text field
I tried starting with the following code, but I couldn't even get AHK to copy paste my selection to Notepad++.
^!x::
Send, ^c
ClipWait
IfWinExist, Notepad++
{
WinActivate
Send ^v
}
Upvotes: 2
Views: 8946
Reputation: 6930
Here is working script:
^!x::
Send, ^c
ClipWait
SetTitleMatchMode, 2
IfWinExist, Notepad
{
WinActivate
Send, ^v
}
return
I added command SetTitleMatchMode, 2
as Joe DF mentioned in comments. That command (link) with parameter 2
sets the matching behavior of IfWinExist
command so that a window's title can contain WinTitle anywhere inside it to be a match. Also added return
in the end.
Upvotes: 3