Automator快速操作仅在Automator中运行,而不是在Finder快速操作菜单中运行

发布于 2025-02-10 02:55:12 字数 594 浏览 1 评论 0原文

我有一个Automator快速操作(QA),该操作调用BASH脚本以在指定文件夹中的文件上作用。在Automator内部运行时,效果很好。但是,通过右键单击输入文件夹来调用Finder的快速操作,没有任何错误或日志文件(据我所知)。 link automator代码的屏幕截图。我的第一个bash代码以及关于堆栈跨流的第一个问题 - 感谢任何可能能够提供帮助的人。 Apple Silicon Mackbook Pro;运行Mac OS 12.4。

附加信息: QA获取选定的文件夹,并通过“ $ a”参数将其传递给Bash Shell脚本。所选文件夹将包含文本文件(.srt)和电影文件(.mp4)。 Bash脚本进行一些文本解析,并将参数传递给Exiftool程序,该程序将GPS元数据添加到电影文件中。

找到了解决方法:我能够导入 atumator工作流程到Mac OS 快捷键应用程序,并且自动化通过我的菜单栏命令成功运行苹果。

I have an Automator Quick Action (QA) which calls a bash script to act on files within a specified folder. It works great when run inside Automator. But invoking the Quick Action from Finder by right clicking on the input folder does nothing with no errors or log files (as far as I can tell). screenshot of Automator code at link. My first bash code, and first question on stack-overflow - thanks to anyone in advance who might be able to assist. Apple silicon mackbook pro; running Mac OS 12.4.

Additional Info: The QA gets a selected folder and passes it to the bash shell script via "$a" argument. The selected folder will contain text files (.SRT) and movie files (.MP4). The bash script does some text parsing and passes on arguments to the Exiftool program which adds GPS metadata to the movie files.

Workaround found: I was able to import the automator workflow into the Mac OS Shortcuts App and the automation ran successfully via a menu bar command on my Mac.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

荭秂 2025-02-17 02:55:12

很长一段时间以来,我遇到了同样的问题,试图使用快速操作从Bash Shell脚本调用Python程序。它在编辑器中没有错误的情况下运行,并且只有在我在Automator中始终打开工作流程时才会运行。最终,我偶然发现了与Automator本身的权限问题。我希望这可以对您有帮助?:

1-进入“系统首选项 - > security& privacy - > privacy”

2-从左侧菜单中选择“可访问性”。

3-在必要时解锁以进行更改,然后单击右侧菜单底部的“+”登录。

4-添加“ Automator”作为值得信赖的应用。

希望它有帮助!

I had the same issue for a long time trying to invoke a python program from bash shell script using quick action. It runs with no error in the editor and would run only if I left the workflow open all of the time in Automator. I eventually stumbled across a permission issue with Automator itself. I hope this could help you maybe?:

1 - Go "System Preferences -> Security & Privacy -> Privacy"

2 - Select "Accessibility" from the left-hand menu.

3 - Unlock to make changes, if necessary, then click the "+" sign at the bottom of the right-hand menu.

4 - Add "Automator" as a trusted app.

Hope it helps!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文