Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 theNumber to "5"
- set theIcon to note
- repeat
- display dialog thePrefix & "Введите период оповещения в минутах:" default answer theNumber with icon theIcon
- set theNumber to text returned of result
- try
- if theNumber = "" then error
- set theNumber to theNumber as number
- exit repeat
- on error
- set thePrefix to "Пожалуйста, "
- set theIcon to stop
- end try
- end repeat
- repeat
- tell application "GrowlHelperApp"
- notify with name "Сядь ровно" ¬
- title "Сядь ровно" ¬
- description "" ¬
- application name "Сядь ровно" ¬
- delay theNumber*60
- end tell
- end repeat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement