OS X AppleScripts

QuickTime Volume Control Script - Quit shouting already!

Safari - Give Me More Screen

QuickTime Volume Control Script

Apple seems to have forgotten to add a system wide volume setting control for Quicktime. The result is every time a Quicktime movie is opened, it plays at maximum volume. This is annoying to say the least. Here's an Apple script to fix that issue.

This script runs continuously, checking every second for a quicktime movie that has just started. It does not run when the system is idle (screen saver active). It sleeps between checks and does not seem to bog down the system. You can add it to your login items so it always starts up.

repeat
  tell application "System Events"
    do shell script "sleep 1" --run every sec
    set frontProc to name of every process -- get name of active application
		
    if frontProc contains "QuickTime Player" and frontProc does not contain "ScreenSaverEngine" then -- not idle
      tell application "QuickTime Player"
        if (count of movie) > 0 then
          repeat with i from 1 to count of movie
            if current time of movie i < 5000 then --just started
	      set sound volume of movie i to 128 --half volume
	    end if
	  end repeat
        end if
      end tell
    end if
  end tell
end repeat

Safari - Go Full Screen

It seems that Apple forgot to give Safari a full screen option to dedicate all available real estate to the page you're on. Here's a script that you can assign to a hot key via FastScripts. Feel free to modify it if you don't normally have the status bar on.

tell application "Safari" to activate
  tell application "System Events"
    tell application process "Safari"
      tell menu bar 1
        tell menu bar item "View" --was safari
	  tell menu "View"
	    set s to name of menu item 4
	    if s = "Hide Bookmarks Bar" or s = "Show Bookmarks Bar" then
	      click menu item 4
	    end if
		
	    set s to name of menu item 5
					
	    if s = "Hide Status Bar" or s = "Show Status Bar" then
	      click menu item 5
	    end if
					
	    set s to name of menu item 1
				
	    if s = "Hide Address Bar" or s = "Show Address Bar" then
	      click menu item 1
	    end if
					
 	  end tell
        end tell
      end tell
    end tell
  end tell
end tell

Home

3924 people have been enlightened with AppleScripts.