我想修剪AppleScript中返回的字符串。这是我打包的应用程序中的脚本目录。其想法是让此应用程序移动,因为旧应用程序依靠静态目录在其应用程序包中包含的另一个应用程序Spore_origin.app中运行脚本。下面的代码:如何在AppleScript中修剪字符串?
to run
set current_path to POSIX path of (path to me) as string
tell application "Terminal"
do script current_path & "/Spore_origin.app/Contents/MacOS/cider_noui"
end tell
end run
我想要做的是修剪这一关结束:
/Users/mypetnamedsteve/Stuff/Spore.app/Contents/Resources/Scripts/ main.scpt
的突出显示的位需要修剪,但我不知道如何。帮帮我!!!!
谢谢!我真的很陌生,我只想让这个该死的错误计划正常工作(他们在几年前停止了对它的支持)。 –