MacResource
Trying to use Automator - Printable Version

+- MacResource (https://forums.macresource.com)
+-- Forum: My Category (https://forums.macresource.com/forumdisplay.php?fid=1)
+--- Forum: Tips and Deals (https://forums.macresource.com/forumdisplay.php?fid=3)
+--- Thread: Trying to use Automator (/showthread.php?tid=74737)



Trying to use Automator - DaviDC. - 03-20-2009

I have an .aif file of the Mac startup chime & I want QuickTime to play this file as soon as the Dell mini 9 finishes booting.

For the 1st time ever, I launched Automator to try & do this. What I ended up with is:
1. Get specified Finder Item (the chime file)
2. Open Finder Items (Open with QuickTime Player)
3. Quit Application: QuickTime Player.

The sound file shows up when I view Results after the action runs, but the only sound I hear is a beep. I saved it as an application & when it runs, QuickTime Palyer launches & then closes but there's no sound.

What am I missing here?


Re: Trying to use Automator - Doc - 03-20-2009

Just save this as an application (uncheck the startup screen and stay-open options) from AppleScript's Script Editor and make it a login item.

do shell script 
afplay [path to file]

Substitute the path to your sound file for the stuff in the brackets.


Re: Trying to use Automator - DaviDC. - 03-20-2009

Thank, but that didn't work. I got a long script error & I don't know enough about AppleScripts to even know where to start fixing it.

do shell script "afplay[/users/emdc/music/mac startup .aif]"


Re: Trying to use Automator - btfc - 03-20-2009

"afplay[/users/emdc/music/mac startup .aif]"

With or without the brackets?


Re: Trying to use Automator - DaviDC. - 03-20-2009

Should I omit the brackets?

I got a different error message without the brackets.


Re: Trying to use Automator - Doc - 03-20-2009

No brackets and it's case-sensive so the Users and Music folders start with a cap.

...And there's a space after afplay.

Also, since you've put a space in the file-name, you'll have to escape it with backslashes or change the name to remove the space.

It should look something like this (assuming that the name of the file is correct):

do shell script 
afplay /Users/emdc/Music/Mac\\ startup.aif



Re: Trying to use Automator - DaviDC. - 03-20-2009

Thank you!!!!!

It doesn't happen as soon as I'd like, but now the Dell Mac mini 9 has the familiar Mac startup chime!