- Joined
- Jan 4, 2011
- Messages
- 1
- Reaction score
- 0
- Points
- 1
I am trying to make a simple AppleScript application in Xcode. I want it to set the computer to sleep after 30 minutes. My code looks like this:
It works, but how do i make the delay?
Jonas.
script musicAppDelegate
property parent : class "NSObject"
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
tell the application "Finder" to sleep
end applicationWillFinishLaunching_
on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
return current application's NSTerminateNow
end applicationShouldTerminate_
end script
It works, but how do i make the delay?
Jonas.