I am looking for a Microsoft Windows program that can copy the title of the selected window to the clipboard. Preferably, with a keyboard shortcut. Any license or price is fine.
2 Answers
You can use a script to do it with AutoHotkey (free scripting language for desktop automation on Windows):
^!l::
WinGetActiveTitle, Title
Clipboard = %Title%
return
-
What does ! mean in AutoHotKey? ^ means control, so what the hot key actually is? Commented Dec 25, 2020 at 10:27
-
! is Alt modifier autohotkey.com/docs/Hotkeys.htm The whole hotkey shortcut is therefore Ctrl + Alt + L– cek-cekCommented Mar 24, 2021 at 12:43
You can use a voice command in Dragon NaturallySpeaking (non-free).
Code from PGilm:
'
' get window title
'
Sub Main
Clipboard ( GetWindowTitle )
End Sub
'
' Use these Windows Functions for Getting an active Window title
'
Declare Function GetForegroundWindow Lib "user32" () As Long
'
Declare Function GetWindowText Lib "user32" _
Alias "GetWindowTextA" ( ByVal hwnd As Long , _
ByVal lpString As String , ByVal cch As Long ) As Long
'
' GetWindowTitle
' (Gets an active Window title)
'
Function GetWindowTitle() As String
Dim x As Integer
Dim TitleText As String * 300
Dim hw As Long
hw = GetForegroundWindow()
x = GetWindowText ( hw , TitleText , Len ( TitleText ) )
GetWindowTitle = Trim ( Left ( TitleText , x ) )
End Function
'