Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set fileExists to "no"
- tell application "Finder"
- if exists POSIX file "/tmp/oldvolume" then
- set fileExists to "yes"
- end if
- end tell
- tell application "iTunes"
- if fileExists = "yes" then
- set target to do shell script "cat /tmp/oldvolume"
- set target to target * 1
- repeat while sound volume < target
- set sound volume to (sound volume + 1)
- end repeat
- do shell script "rm /tmp/oldvolume"
- else
- do shell script "echo " & sound volume & " > /tmp/oldvolume"
- set target to (sound volume / 2)
- repeat while sound volume > target
- set sound volume to (sound volume - 1)
- end repeat
- end if
- end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement