Repeat AppleScript
Hello, I am creating an AppleScript-based Xcode App.
This is my script:
script AppDelegate
property parent : class "NSObject"
on applicationWillFinishLaunching_(aNotification)
tell application "Finder"
if disk "Mac_Keys" exists then
(*do nothing*)
else
tell application "Finder" to sleep
end if
end tell
end applicationWillFinishLaunching_
on applicationShouldTerminate_(sender)
display dialog "Goodbye"
return current application's NSTerminateNow
end applicationShouldTerminate_
end script
How can I make the italisized part repeat every 5 seconds?
Mac mini, OS X Mountain Lion (10.8.3)