2
我有以下函數,它字符串分割:錯誤號-1708分則字符串
on splitText(aString, delimiter)
set retVal to {}
set prevDelimiter to AppleScript's text item delimiters
set AppleScript's text item delimiters to {delimiter}
set retVal to every text item of aString
set AppleScript's text item delimiters to prevDelimiter
return retVal
end splitText
當單獨使用,它的工作原理確定
日誌splitText(「HTTP://谷歌。 COM | /Users/pistacchio/Desktop/google.jpg」, 「|」)
但是,當我我需要的範圍內使用它,我得到一個錯誤-1708
tell application "Safari"
activate
repeat with row in linesToPrint
log splitText("http://google.com|/Users/pistacchio/Desktop/google.jpg", "|")
end repeat
end tell
linesToPrint
是一串字符串
任何幫助?
您能否請回答此問題: - http://stackoverflow.com/questions/13890369/not-able-to-execute-applescript-within-mail-application –