Adjusting volume using applescript?

Joined
Jun 21, 2006
Messages
54
Reaction score
0
Points
6
Your Mac's Specs
MacBook Pro Retina 15" 2.6GHz Intel Core i7, 8GB DDR3L RAM, 512GB SSD, NVIDIA GeForce GT 650M
Hey everyone;

Ok, ill start of by saying i'm a complete newb when it comes to scripting using applescript. I want a script, or something, that will turn my my volume to zero whenever I turn my mac off.

Anyhelp?
 
Joined
Oct 27, 2005
Messages
4,702
Reaction score
404
Points
83
Is this anything to do with the startup chime?

I can't write Applescripts but you would need one for shutdown and another for startup. Another alternative is to have a plug in the headphone jack which would keep your MacBook Pro quiet at startup.
 
OP
PrimalYeti
Joined
Jun 21, 2006
Messages
54
Reaction score
0
Points
6
Your Mac's Specs
MacBook Pro Retina 15" 2.6GHz Intel Core i7, 8GB DDR3L RAM, 512GB SSD, NVIDIA GeForce GT 650M
Is this anything to do with the startup chime?

I can't write Applescripts but you would need one for shutdown and another for startup. Another alternative is to have a plug in the headphone jack which would keep your MacBook Pro quiet at startup.

I want a script to do it though, i dont want to have to buy a headphone plug
 
Joined
Sep 21, 2005
Messages
809
Reaction score
111
Points
43
Location
ohio
Your Mac's Specs
iBook G4 OSX Tiger
I'm not sure how to get it the script to run on shut down so this script sets the volume to mute then starts the shut down process.
Code:
set volume with output muted

tell application "Finder" to shut down

Alternatively, there is a preference pane available that supposedly does what you are asking for. I haven't used it so I can't give you a review but I thought you might want to take a look at it.
http://www.versiontracker.com/dyn/moreinfo/macosx/23141
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
To mute the volume during shutdown you could try this method which works on my G4 tower. I don't have the time to test it on my Intel right now.

Unix has special scripts that get executed during startup and shutdown. As a safeguard the system also looks for custom 'local' scripts named rc.local and rc.shutdown.local in the Unix directory /etc.

In the shutdown script place
osascript -e "set volume with output muted"

In the startup script place
osascript -e "set volume without output muted"

That startup script will restore your volume to what it was before you muted on shutdown, but after the startup chime would have sounded. In other words, this gets you silent startups.

You'll need sudo (admin) privilege to create or alter the files. Search the forums if you don't know what that is.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top