Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm attempting to write an Automator application that will mount an external disk. I have an AppleScript that does the job and I'm attempting to insert it into an Automator application. However, rather than paste in the script I want to call the file, I have the following in Automator:

on run {input, parameters}
    run script file "Macintosh HD:Users/username/Documents/Scripts and Automator/mountdrive.scpt"
end run

However, this produces a syntax error:

Can’t make some data into the expected type.

Any suggestions as to the source of the problem?

share|improve this question


on run {input, parameters}
    set myScriptPath to (path to documents folder as text) & "Scripts and Automator:mountdrive.scpt"
    run script alias myScriptPath
end run
share|improve this answer
Thx for the response. The issue has to do with the separators, they should be ':' – dorich Sep 24 '13 at 5:23

Apparently the problem with the syntax is that the path needs to be separated by ':' as opposed to '/'. Posix uses '/' and Apple uses ':'

share|improve this answer

run script also accepts a "POSIX path", you don't need the explicit run handler:

run script "/Users/username/Scripts and Automator/mountdrive.scpt"

You could also add a Run Shell Script action where the content is osascript ~/Documents/Scripts\ and\ Automator/mountdrive.scpt.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.