Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global interval
- tell application "GrowlHelperApp"
- -- Make a list of all the notification types
- -- that this script will ever send:
- set the allNotificationsList to ¬
- {"Сядь ровно" }
- -- Make a list of the notifications
- -- that will be enabled by default.
- -- Those not enabled by default can be enabled later
- -- in the 'Applications' tab of the growl prefpane.
- set the enabledNotificationsList to ¬
- {"Сядь ровно"}
- -- Register our script with growl.
- -- You can optionally (as here) set a default icon
- -- for this script's notifications.
- register as application "Сядь ровно" ¬
- all notifications allNotificationsList ¬
- default notifications enabledNotificationsList ¬
- end tell
- set thePrefix to ""
- set interval to "5"
- set theIcon to note
- repeat
- display dialog thePrefix & "Введите период оповещения в минутах:" default answer interval with icon theIcon
- set interval to text returned of result
- try
- if interval = "" then error
- set interval to interval as number
- exit repeat
- on error
- set thePrefix to "Пожалуйста, "
- set theIcon to stop
- end try
- end repeat
- on idle
- tell application "GrowlHelperApp"
- notify with name "Сядь ровно" ¬
- title "" ¬
- description "Сядь ровно" ¬
- application name "Сядь ровно" ¬
- end tell
- return interval * 60
- end idle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement