Created
January 26, 2010 15:31
-
-
Save yosshi/286914 to your computer and use it in GitHub Desktop.
iTunes を指定時間で停止させるAppleScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- AppleScript | |
-- iTunesSleepTimer | |
display dialog "Stop iTunes after input minutes:" default answer "30" | |
set res to result | |
if button returned of res is "OK" then | |
set sec to (text returned of res) * 60 | |
set curDate to current date | |
set time of curDate to (time of curDate) + sec | |
display dialog "iTunes will stop at " & time string of curDate buttons {"Stop Now"} giving up after sec | |
tell application "iTunes" | |
stop | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment