Run shortcut key without losing focus on current Window

cliftonmorris

Reputable
Sep 7, 2014
1
0
4,510
Hi, I created a shortcut key so that if I press Ctrl-Alt-Z, a cmd script runs. When I do this, I see the cmd window flash on the screen and close, and my mouse cursor is taken away from the current window. How can I make the mouse cursor remain in the current window?

I don't think it matters, but what the script does is add a frequently used text string to the clipboard so I can paste it with Ctrl-V.

mycopy.bat contains one line: clip < "C:\temp\regular_p.txt"
I created a shortcut mycopy.bat and in properties I specified a shortcut key of Ctrl-Alt-Z
I want to be able to choose Ctrl-Alt-Z and then Ctrl-V to paste.
Right now I have to do Ctrl-Alt-Z, click the mouse button to get back to current window, Ctrl-V.
 
Solution
If you create a shortcut to the .bat script you'll be able to select option "Run: minimized" in shortcut's Properties (obviously then you'll need to run shortcut, not .bat directly on key combo).
If you create a shortcut to the .bat script you'll be able to select option "Run: minimized" in shortcut's Properties (obviously then you'll need to run shortcut, not .bat directly on key combo).
 
Solution

TRENDING THREADS