5

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

2 Answers 2

5

You can use a script to do it with AutoHotkey (free scripting language for desktop automation on Windows):

^!l::
WinGetActiveTitle, Title
Clipboard = %Title%
return
2
  • What does ! mean in AutoHotKey? ^ means control, so what the hot key actually is?
    – user541396
    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-cek
    Commented Mar 24, 2021 at 12:43
0

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
'

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.