使用 AutoHotKey 将脚本路径复制到剪贴板
Copy to clipboard the script path with AutoHotKey
我试过了,但它没有复制包含脚本的文件夹的路径:
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 }
感谢您的帮助!
P.S:为此,我将 AHK 用作蝙蝠,而不是热键
ClipSaved := ClipboardAll ; Save the entire clipboard to the variable ClipSaved
clipboard = %A_ScriptDir%
; ClipWait
; do sth e.g, ; SendInput, ^v
Clipboard := ClipSaved ; Restore the original clipboard
我试过了,但它没有复制包含脚本的文件夹的路径:
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 }
感谢您的帮助!
P.S:为此,我将 AHK 用作蝙蝠,而不是热键
ClipSaved := ClipboardAll ; Save the entire clipboard to the variable ClipSaved
clipboard = %A_ScriptDir%
; ClipWait
; do sth e.g, ; SendInput, ^v
Clipboard := ClipSaved ; Restore the original clipboard