Thanks in advance for any help on this.
My objective is to use a keystroke combination (e.g. CTRL+SHIFT+W) to write the name/title of the active window to the clipboard.
In order to do this, I'd like a very simple .exe which i will then create a shortcut of; i will then assign the keystroke combination to the shortcut file (through the 'Properties' dialogue) in order to be able to execute the script without deactivating the window whose name/title i want to be able to CTRL+V paste elsewhere.
For example, I'm working in an excel file with a long name; I'd like to be able to hit CTRL+SHIFT+W and then switch to an email and CTRL+V paste the name of that file to tell someone what file I'm referencing or working in. This would be extremely helpful while working in Word and PDF files. I think the filename is practically the title of excel, word, and adobe reader windows. Not really concerned about other software window titles.
I scoured the web for a solution and found this, but I have not been able to make it work:
Code: Select all
^!l::
WinGetActiveTitle, Title
Clipboard = %Title%
return