New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Ľ Advice and insight from world-class Apple enthusiasts Ľ Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Adjusting volume using applescript?


Post Reply New Thread Subscribe

 
Thread Tools
PrimalYeti

 
PrimalYeti's Avatar
 
Member Since: Jun 21, 2006
Posts: 54
PrimalYeti is on a distinguished road
Mac Specs: MacBook Pro Retina 15" 2.6GHz Intel Core i7, 8GB DDR3L RAM, 512GB SSD, NVIDIA GeForce GT 650M

PrimalYeti is offline
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?
QUOTE Thanks
NanoBite

 
Member Since: Oct 27, 2005
Posts: 4,714
NanoBite is an unknown at this point

NanoBite is offline
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.
QUOTE Thanks
PrimalYeti

 
PrimalYeti's Avatar
 
Member Since: Jun 21, 2006
Posts: 54
PrimalYeti is on a distinguished road
Mac Specs: MacBook Pro Retina 15" 2.6GHz Intel Core i7, 8GB DDR3L RAM, 512GB SSD, NVIDIA GeForce GT 650M

PrimalYeti is offline
Quote:
Originally Posted by Pulse-8 View Post
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
QUOTE Thanks
puaerotch

 
puaerotch's Avatar
 
Member Since: Sep 21, 2005
Location: ohio
Posts: 809
puaerotch is a glorious beacon of lightpuaerotch is a glorious beacon of lightpuaerotch is a glorious beacon of lightpuaerotch is a glorious beacon of lightpuaerotch is a glorious beacon of lightpuaerotch is a glorious beacon of light
Mac Specs: iBook G4 OSX Tiger

puaerotch is offline
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
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
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.
QUOTE Thanks

Post Reply New Thread Subscribe


« sorry for being ignorant but could someone tell me what DARWIN is | New Program for Darwin: walk »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Volume level fasheezy Apple Notebooks 29 03-20-2012 12:48 AM
Macbook pro acting up... keeps adjusting sound volume by itself moss Apple Notebooks 1 06-13-2006 04:44 AM
Adjusting volume on keyboard Emuleem22 Switcher Hangout 2 03-05-2006 07:36 AM
[ANN] New comprehensive AppleScript book hanaan OS X - Development and Darwin 0 11-06-2004 07:28 PM
External Drive Corruption? mrrumfoord OS X - Operating System 2 05-17-2004 01:02 AM

All times are GMT -4. The time now is 02:45 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?