I have tried this but it's not copying the path of the folder containing the script:
If(WinActive("ahk_class ExploreWClass"))
{ ClipSaved := ClipboardAll
; save original clipboard clipboard = ; clear
clipboard Send, "%A_WorkingDir%" ; copy selected folder
ClipWait, 2 ; wait until the clipboard contains data Sleep,
100 }
Thanks for your help!
P.S: For this, I am using AHK as a bat, not as a hotkey