AppleScript的2X上点击运行 [英] run applescript on 2x-click

查看:316
本文介绍了AppleScript的2X上点击运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OK,这感觉就像一个白痴的问题,但我坚持 - 我不知道有关AppleScript的第一件事。我有一个.scpt文件,我想双击它,只是有它运行的,而是我每次点击的时候,它打开了的AppleScript编辑器。这感觉就像它应该只是在文件的选项,但我缺少明显的东西。

OK, this feels like an idiot question, but I'm stuck - I don't know the first thing about AppleScript. I have a .scpt file and I want to double-click it and just have it run, but instead every time I click, it opens up the AppleScript Editor. This feels like it should just be an option on the file, but I'm missing something obvious.

请帮我觉得不太哑了,谢谢你。

Please help me feel less dumb, thank you.

推荐答案

从文件菜单,选择导出;就会有文件浏览器下方的文件格式下拉列表。为了得到一个双点击应用程序而不是一个文件,选择应用程序。这将产生一个的.app <​​/ code>捆绑像普通的Mac应用程序(这也将让你打包与脚本其他资源如果需要)。您可以选择只运行与否;如果你这样做,那么与任何人就在的.app <​​/ code>将无法进一步编辑你的脚本,因为它会被编译。 (但如果你保存副本的应用程序,这可能是你想要的。)

From the "File" menu, choose "Export"; there’ll be a "File Format" dropdown underneath the file browser. To get a double-clickable application instead of a document, choose "Application". This will produce a .app bundle like ordinary Mac applications (this will also let you package other resources with your script if you need to). You can choose "Run Only" or not; if you do, then anybody with just the .app won’t be able to edit your script further, since it’ll be compiled. (But if you’re saving a copy as the application, that might be what you want.)

另一种选择,按上提出不同匿名用户,将保存/导出文件一个脚本( .scpt )或脚本软件包( .scptd ),它保存在〜/资源库/脚本/ ,并选中在菜单栏中显示脚本菜单,在脚本编辑器的preferences。

Another option, as per an anonymous user on Ask Different, would be to save/export your file as a "Script" (.scpt) or "Script Bundle" (.scptd), save it in ~/Library/Scripts/, and check "Show Script menu in menu bar" in Script Editor’s preferences.

(如果您运行的是旧版本的OS X,这个答案的第一个版本具有信息您要找的。)

(If you’re running an old version of OS X, the first version of this answer has the information you’re looking for.)

这篇关于AppleScript的2X上点击运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆