]> snippets.scripts.mit.edu Git - Scripts/git/.git/commitdiff
Added the set volume script
authorPaul Quimby <pquimby@dhcp-18-111-22-13.dyn.mit.edu>
Sun, 5 Apr 2009 04:28:41 +0000 (00:28 -0400)
committerPaul Quimby <pquimby@dhcp-18-111-22-13.dyn.mit.edu>
Sun, 5 Apr 2009 04:28:41 +0000 (00:28 -0400)
sipbmp3-itunes/Set sipbmp3 volume.applescript [new file with mode: 0644]

diff --git a/sipbmp3-itunes/Set sipbmp3 volume.applescript b/sipbmp3-itunes/Set sipbmp3 volume.applescript
new file mode 100644 (file)
index 0000000..f6423c9
--- /dev/null
@@ -0,0 +1,29 @@
+-- Changelog:
+--
+-- 5 April 2009 -> pquimby created initial version
+--
+-- Installation:
+--
+-- 1) Launch the Printer Setup Utility and add
+--    an IP Printer with the LPD protocol with
+--    the following information:
+--     Address: zygorthian-space-raiders.mit.edu
+--     Queue: sipbmp3
+--    It is not necessary to specify the driver.
+--    Be sure the name of the printer is sipbmp3 or 
+--
+-- 2) Create the directory ~/Library/iTunes/Scripts
+--    and place the "Send to sipbmp3.scpt" file
+--    within.
+--
+-- Usage:
+--  This script will set the volume of sipbmp3 (assuming you have remctl) to your iTunes volume scaled to the max value of 31 (which is the max volume for sipbmp3 at the time this script was written).
+
+-- Ex:// If your iTunes volume is set at 50% then you will set the sipbmp3 volume to .50*31 or roughly 15.
+
+tell application "iTunes"
+       set vol to (sound volume * 31 / 100)
+end tell
+
+set command to "/usr/local/bin/remctl zsr volume set " & vol
+do shell script command
\ No newline at end of file