tell application "SpriteBuilder" to activate
tell application "SpriteBuilder"
open "portrait.spritebuilder"
end tell
portrait.spritebuilder
目录与脚本位于同一目录中。我想我需要一条绝对的道路,但我似乎无法让它发挥作用。我尝试过调整this的建议,但没有运气。有什么想法吗?
答案 0 :(得分:2)
链接的答案应该有效。你把它放在Finder块中了吗?像这样:
tell application "Finder"
set myFolder to container of (path to me) as text
end tell
tell application "SpriteBuilder"
activate
open myFolder & "portrait.spritebuilder"
end tell