I've got some short AppleScript code designed to display notifications at a specified interval. The code works perfectly from the Script Editor, but not when exported as an Application. Instead, notifications never show up in the top left though they do appear in Notification Center. However, instead of happening every interval (say once/minute) they just trigger continuously.
Here's the code:
set lasttime to current date set min to 5 as number set interval to 1 as number repeat display notification "Notification" with title "Title" delay (interval * 60) if (((current date) - lasttime) / minutes) ≥ min then exit repeat end repeat
Any ideas what I'm doing wrong here?