AppleScript calcule time

applescripttime

I'm trying to do if statement with the current time,

e.g

if Time is between 14h and 14:30 then … if time is between 14:30
and 15h then …

and so on.

time string of (current date)
set Timeleft to missing value

if time string is in "14:00:00" and "14:29:60" then

end if

now obviously time is not a string like i did in my script, how can I make that working?

Also here is my system time format :
current date

  --> date "Saturday 9 December 2017 at 14:10:09"

Best Answer

Found a work around

set myTime to time string of (current date) as Unicode text
##set Timeleft to missing value

if myTime > "14:00:00" and myTime < "14:30:60" then
    display notification "!"
end if