I have to write an Applescript to automount a folder depending on the user. Applescript Editor throws this error.
A end of line can’t go after this identifier.
Here the portion of the script that is throwing the error.
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
path
can't be a variable name.
try
set short_name to do shell script "whoami"
set p to "afp://fileserver.local/Faculty/" & short_name
display dialog p
end try
Works fine.