提供: Wikinote
移動: 案内検索


  • スリープタイマ
display dialog "Sleep 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 "Sleep at " & time string of curdate buttons {"Cancel"} giving up after sec
    tell application "Finder"
    end tell
end if