如何从MacOS X扩展坞启动脚本? [英] How can I launch a script from the MacOS X dock?

查看:56
本文介绍了如何从MacOS X扩展坞启动脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我可以将应用程序固定到扩展坞并从那里启动它们.但是,是否有一种方法可以将程序固定到不是MacOS意义上的应用程序"的扩展坞上,例如bash脚本?

I know that I can pin applications to the dock and launch them from there. However, is there a way to pin a program to the dock that is not an "application" in the MacOS sense, like a bash script for example?

推荐答案

您可以将任何文件拖到Dock的右侧栏(废纸and"和文件夹所在的位置),然后通过单击将其执行.

You can drag any file to the right bar of the Dock (where the Trash and folders are), and execute it by clicking it.

要执行Shell脚本,可以将其另存为.command文件,然后操作系统会对其进行提取.

To execute a shell script, you can save it as a .command file and the OS will pick it up.

另一种替代方法是为您的脚本创建一个Applescript应用程序,并将其像任何应用程序一样使用.

Another alternative would be to create an Applescript application for your script, and use it like any application.

这篇关于如何从MacOS X扩展坞启动脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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