Timer

Simple timer. Any Q’s hit me up on AIM iglip@mac.com

set meRunning to true
set timer to text returned of (display dialog "Timer in minuets:" default answer "")
tell application "System Events" to set {thour, tmin} to {hours of (current date), (minutes of (current date)) + timer}
if tmin > 60 then
	set tmin to tmin - 60
	set thour to thour + 1
end if

repeat while meRunning
	tell application "System Events" to set {hour, Min} to {hours of (current date), minutes of (current date)}
	if thour = hour then
		if tmin = Min then
			set meRunning to false
		end if
	end if
	delay 10
end repeat

--Place what you want to happen when timer is up below this line.
repeat 5 time
beep
delay .5
end repeat

Hi, aaon.

Even simpler:

set timer to text returned of (display dialog "Timer in minutes:" default answer "")
set endTime to (current date) + timer * minutes

repeat while ((current date) comes before endTime)
	delay 10
end repeat

--Place what you want to happen when timer is up below this line.
repeat 5 times
	beep
	delay 0.5
end repeat

hows this:


set timer to text returned of (display dialog "Timer in minutes:" default answer "")
delay (timer*60)

--Place what you want to happen when timer is up below this line.
repeat 5 times
beep
delay .5
end repeat

See that is my problem, I love to over complicate things!