AppleScript 隐藏执行shell脚本文件

-- 假设您的脚本文件名为 "MyScript.scpt" 并且存放在桌面上
set scriptFile to POSIX path of (path to desktop as string) & "MyScript.scpt"

-- 加载脚本文件
set loadedScript to load script file scriptFile

-- 运行加载后的脚本
try
    run script loadedScript
on error errorMessage number errorNumber
    display dialog "执行脚本时发生错误: " & errorMessage & " (错误号: " & errorNumber & ")"
end try