Good evening, All -
I'm new to this forum, but I love the information/assistance provided. I've 'lurked' before - gleaning information - but I never had to post because I always found the solution. Now, I'm stumped on something, and thought you all might be able to assist me.
I have a very simple batch file that copies the contents of a txt file onto the clipboard. Trust me, this is a simple file...the command is:
C:\Windows\System32\cmd.exe /k clip < c:\transfers\test.txt
c:\exit
test.txt contains the information that I want pasted to the clipboard (e.g. my email address).
Next, I've assigned a hotkey to the shortcut that runs that batch file. So, for example, CTRL+ALT+O would copy the text in test.txt onto the clipboard. I can then use CTRL+V to paste that pretty much anywhere.
So far, so good.
Now, let's say that I'm on a webpage, and it asks for my email address. Rather than typing it, I press CTRL+ALT+O to place it on the clipboard. Here's where I hit my issue. When the batch file runs, I lose the focus on the field that I wanted to fill in on the webform (or whatever program), so I have to click back to the field and THEN paste.
Here is my question...is there a way that I can adjust the batch file so that it will "hold" or "return to" the field where I hit the hotkey combination, so that all I need to do is hit CTRL+V (or, better yet, where it would "know" to paste right there and I could save the CTRL+V step)?
In other words, I want the focus to STAY WHERE IT WAS or to RETURN TO WHERE I HAD IT. The general concept is to SAVE keystrokes, and having to get the focus back adds some extra steps. Not the end of the world, but still, I'm trying to make the process better!
Thank you, in advance, for any insight/knowledge you may have. I've given a very simple example above, but if I can solve the focus issue, I can think of lots of places to use this simple command sequence.
Have a great night!
NOTE: The batch file above works on Windows 7 or 8 or 8.1