Maintaining Volume Level on Auto Restart

Discussion in 'Mac Programming' started by stretchphoto, Apr 8, 2011.

  1. macrumors newbie

    Joined:
    Apr 3, 2011
    Location:
    Miami
    #1
    Hi. I have four mac minis in kiosks around Miami. They're set to restart automatically after a power failure. I've noticed, however, that when they restart in such a situation, the volume in the System Preferences is lower than what I'd set it at previously.

    I guess there's some sort of volume level it defaults to. Does anyone have any ideas on how to change that?

    Thanks!
     
  2. macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #2
    The volume can be set from the command line with something like

    Code:
    /usr/bin/osascript -e 'set volume 7'
    
    0 means silent. 7 means full volume.

    Perhaps you could get that to run at startup.
     
  3. thread starter macrumors newbie

    Joined:
    Apr 3, 2011
    Location:
    Miami
    #3
    Yep, I think that's what I'm looking for.

    Is that an applescript, or does it go into the terminal?

    I'm a complete novice with this stuff, though I've had some recent success w/ automator and applescript.

    Thanks.:)
     
  4. macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #4
    "set volume 7" is AppleScript. The command I gave above runs in the Terminal or a Bash script. It just runs the AppleScript via the osascript program.
     

Share This Page