【问题标题】:Choose file prompt, show hidden files? Applescript objtc选择文件提示,显示隐藏文件? Applescript 对象
【发布时间】:2014-09-11 23:02:56
【问题描述】:

我用它来提示我可以在哪里选择一个文件

set thePath to quoted form of POSIX path of (choose folder with prompt "whatever)

如何在“有提示的选择文件夹”中查看隐藏文件? 允许在 finder 中查看隐藏文件并没有什么不同。

【问题讨论】:

  • 为了回答者和未来读者的利益:如果答案解决了您的问题,请点击大检查接受在它旁边做标记;如果您发现答案有帮助,请通过单击向上箭头图标投票(您可以同时执行这两项操作)。见the relevant help-center article。如果您的问题尚未得到完全解答,请提供反馈。

标签: xcode macos operating-system applescript


【解决方案1】:

您只需添加with invisibles:

set thePath to quoted form of POSIX path of ¬
 (choose folder with prompt "whatever" with invisibles)

您可以在 Standard Additions 字典中找到 choose folder 命令的完整语法:在 AppleScript Editor 中,按 Cmd-Shift-O(或选择 File > Open Dictionary...)并选择 StandardAdditions.osax从列表中。

【讨论】:

    猜你喜欢
    • 2016-06-19
    • 2012-10-24
    • 1970-01-01
    • 2014-02-25
    • 1970-01-01
    • 1970-01-01
    • 2016-01-22
    • 1970-01-01
    • 2015-02-15
    相关资源
    最近更新 更多