使用 automator 创建一个实用程序,它使用终端打开特定文件夹并运行 'compass watch' 脚本

Make an utility with automator which opens a specific folder with terminal and runs the 'compass watch' script

我有这个自动程序设置,它允许您使用终端打开文件夹。我想要的是通过终端打开文件夹后,它应该 运行 compass watch 脚本。

这是我目前所拥有的,但我自己似乎没有找到解决方案。我尝试添加一些 applescript 和一些 bash,但似乎没有任何效果。有人知道解决方案吗?

试试这个:

在您的工作流程中添加“运行 AppleScript”操作

如果 compass watch 脚本是一个文件,使用这个 AppleScript 脚本

on run {input, parameters}
    set compasswatchScript to quoted form of "" -- drag drop the script file between double quote
    tell application "Terminal"
        do script compasswatchScript in window 1
    end tell
end run

在这个脚本的第二行插入你的脚本文件的路径

--

如果 compass watch 是一个命令,使用这个 AppleScript 脚本

on run {input, parameters}
    tell application "Terminal"
        do script "compass watch" in window 1
    end tell
end run