我想修剪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
的突出顯示的位需要修剪,但我不知道如何。幫幫我!!!!
謝謝!我真的很陌生,我只想讓這個該死的錯誤計劃正常工作(他們在幾年前停止了對它的支持)。 –