【问题标题】:How do I retrieve the filename of the current script in AutoHotkey?如何在 AutoHotkey 中检索当前脚本的文件名?
【发布时间】:2017-09-27 08:57:34
【问题描述】:

我想在 AutoHotkey 中检索当前正在运行的脚本的文件名并将其保存到变量中。

例如,如果我的脚本名为 sample-script.ahk,我想显示一条消息“当前脚本是 sample-script.ahk”。

如何在 AutoHotkey 中检索当前活动脚本的文件名?

【问题讨论】:

    标签: autohotkey


    【解决方案1】:

    使用:A_ScriptName 当前脚本的文件名,不带路径,例如MyScript.ahk。

    MsgBox, The current script is %A_ScriptName%
    

    见:https://autohotkey.com/docs/Variables.htm#BuiltIn

    更具体地说,https://autohotkey.com/docs/Variables.htm#ScriptName

    【讨论】:

      猜你喜欢
      • 2014-04-09
      • 1970-01-01
      • 1970-01-01
      • 2011-05-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-10
      相关资源
      最近更新 更多