Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

写了个AppleScript,方便M1用户通过命令打开 #16

Open
Lawrence-of-AnKing opened this issue Jun 29, 2023 · 0 comments
Open

写了个AppleScript,方便M1用户通过命令打开 #16

Lawrence-of-AnKing opened this issue Jun 29, 2023 · 0 comments

Comments

@Lawrence-of-AnKing
Copy link

macOS 系统下,M1用户直接打开软件,会无法正常转换,只有通过终端打开才能正常转换。

考虑到每次开终端输命令太麻烦,写了个AppleScript,方便一键启动:

#!/usr/bin/osascript

# @raycast.title Start caj2pdf
# @raycast.author Lawrence Liu
# @raycast.authorURL https://github.com/Lawrence-of-AnKing
# @raycast.description 因为 caj2pdf-qt 有问题,在 M1 上直接启动会无法转换,只有从控制台转换才能正常转换,所以写了个脚本来启动。

# @raycast.icon 📁
# @raycast.mode silent
# @raycast.packageName caj2pdfStart
# @raycast.schemaVersion 1

set caj2pdfStart to "/Applications/caj2pdf.app/Contents/MacOS/caj2pdf"
do shell script caj2pdfStart

使用方法:创建一个 UTF-8 的文本文件,把代码复制进去,改后缀名为 applescript

之后可以直接双击这个脚本来通过命令运行 caj2pdf-qt 。

如果你用的是 Raycast ,也可以放进它的AppleScript指令中,来快速运行:
2023-06-29-154304

经测试,可以正常转换(看起来有个失败了,其实也成功转换了,只是显示失败了):
2023-06-29-153953

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant