AppleScript bizarre error
do shell script "cd " & selectedPath & "; say -v \"Samantha\" \"" & typeText & "\"" & finalName & " -o \"" & fileName & "\"" with administrator privileges
Here's the weird thing... if I remove "with administrator privileges," the script throws an error message "cd: no such file or directory."
If I remove the variable selectedPath and type out the path manually, it works without admin access. However, selectedPath and the path I typed out are exactly the same (I added a display dialog command which prints out selectedPath to make sure it was formatted correctly).
1) If it were a permissions issue, I would think I would get an error related to permissions. Anyone know why I got that error?
2) Why are admin privileges required just to change the directory, and why is it different for a variable vs. hard-coded text?
 MacBook Air-OTHER, OS X Mavericks (10.9.5), 13 in, Mid 2013, Core i5, 256GB