Applescript to sleep computer while using TV software ..
Hi.
I don´t know much about applescript but I manage to do a script to sleep my computer after a number of minutes.
I have the following code
display dialog "Minutes to Shut down:" default answer "60"
delay ((the text returned of the result) * 60)
tell application "EyeTV" to quit -- Set AppName to the name of the application you want to quit.
tell application "Finder"
sleep
end tell
At the moment it works and have been using it for a long time, but I need to introduce some code so the script can be interrupted (by pressing esc or other key) without sending the computer to sleep. At the moment, even when I try to abort the script, the computer goes to sleep.
I would appreciate any help.
S