Copy file names selected in File Explorer with AutoHotkey

The following AutoHotkey script will copy the file names selected in File Explorer.

Useful to fill quotes, invoices and project control sheets.

Just press the F12 key!

Macro explained posted in https://www.gonduana.com/como-copiar-los-nombres-de-archivos-con-autohotkey (in plain Spanish, sorry)

Enjoy!

; Copy file names selected in File Explorer
; www.gonduana.com/como-copiar-los-nombres-de-archivos-con-autohotkey
#IfWinActive ahk_exe explorer.exe
F12 up::
    ControlGetFocus, myControl, A
    If (myControl = "DirectUIHWND3")
    {
        clipboard =
        SendInput, {Control Down}c{Control Up}
        ClipWait, 0
        Clipboard := RegExReplace(Clipboard, "m)^.+\\", "")
        Sort, Clipboard
        MsgBox, 64, File names to Clipboard, %Clipboard%
    }
#IfWinActive