【问题标题】:Copy to clipboard the script path with AutoHotKey使用 AutoHotKey 将脚本路径复制到剪贴板
【发布时间】:2016-01-06 20:04:26
【问题描述】:

我已经尝试过了,但它没有复制包含脚本的文件夹的路径:

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 用作球棒,而不是热键

【问题讨论】:

    标签: autohotkey


    【解决方案1】:
     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
    

    https://autohotkey.com/docs/misc/Clipboard.htm#ClipboardAll

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-10-14
      • 1970-01-01
      • 2019-06-06
      • 2012-06-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-01
      相关资源
      最近更新 更多