【问题标题】:How can choose the file from the dialog panel by using apple script?如何使用苹果脚本从对话框面板中选择文件?
【发布时间】:2021-07-15 18:50:34
【问题描述】:

如何使用苹果脚本从对话框面板中选择文件?

当我编写脚本来激活应用程序时,它需要从弹出的对话框面板中选择要打开的文件。

那么,这个脚本怎么写呢?

非常感谢

【问题讨论】:

  • …激活应用程序。什么应用?欢迎来到 Stackoverflow。请显示您尝试过的代码。这不是代码编写服务。

标签: applescript


【解决方案1】:

如果我没听错的话,你的意思是这样的:

set theFile to choose file

tell application "" --enter the application you want to activate and open your file here
    activate
    open theFile
end tell

但正如 vadian 在 cmets 中已经提到的那样:

…激活应用程序。什么应用?欢迎来到 Stackoverflow。请显示您尝试过的代码。这不是代码编写服务。

下次请多研究一下。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多