Time in Applescript

hi
can someone tell me why this doesn’t work:

property stopRep : false
repeat until stopRep is true
	set theTime to the current date
	time string of theTime
	if theTime is "7:54:49 AM" then
		set stopRep to true
	end if
end repeat

display alert "Time Up!"

when it gets to that time it does nothing.
thanks

Hi,

you set the variable theTime always to the current date, but you need the time string for the comparison
alternatively

repeat
	set theTime to time string of (current date)
	if theTime is "7:54:49 AM" then exit repeat
end repeat

display alert "Time Up!"