我如何从AppleScript应用程序中打开文件?我将它放在我的AppleScript应用程序的/Contents/Resources
中。我想知道的是我会告诉实际的脚本吗?
答案 0 :(得分:2)
要获取应用程序的路径,请使用path to me
命令并构建资源的路径。然后,您可以使用Finder使用默认程序打开文件,也可以告诉特定程序打开文件。
set filepath to (path to me as string) & "Contents:Resources:file.ext"
tell application "Finder"
open alias filepath
end tell
--OR
tell application "Microsoft Word"
open alias filepath
end tell