我必須編寫一個Applescript來根據用戶自動掛載一個文件夾。 Applescript編輯器會引發此錯誤。將一個字符串和一個變量連接成一個字符串在applescript
行結束後不能跟隨此標識符。
這裏是引發錯誤的腳本部分。
try
set short_name to do shell script "whoami"
set path to "afp://fileserver.local/Faculty/" & short_name
mount volume path as user name short_name
end try
我應該補充說明第3行末尾的short_name是突出顯示的。 – jeremyjjbrown
快速提示:由於您的腳本位於'try'塊中,因此您不應該看到任何錯誤。 – fireshadow52
此問題已被瀏覽了一千次,只有一次投票! – jeremyjjbrown