Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tell application "GrowlHelperApp"
  2.  -- Make a list of all the notification types
  3.  -- that this script will ever send:
  4.  set the allNotificationsList to ¬
  5.   {"Сядь ровно" }
  6.  
  7.  -- Make a list of the notifications
  8.  -- that will be enabled by default.      
  9.  -- Those not enabled by default can be enabled later
  10.  -- in the 'Applications' tab of the growl prefpane.
  11.  set the enabledNotificationsList to ¬
  12.   {"Сядь ровно"}
  13.  
  14.  -- Register our script with growl.
  15.  -- You can optionally (as here) set a default icon
  16.  -- for this script's notifications.
  17.  register as application "Сядь ровно" ¬
  18.    all notifications allNotificationsList ¬
  19.    default notifications enabledNotificationsList ¬
  20.  
  21. end tell
  22.  
  23. set thePrefix to ""
  24. set theNumber to "5"
  25. set theIcon to note
  26.  
  27. repeat
  28.    display dialog thePrefix & "Введите период оповещения в минутах:" default answer theNumber with icon theIcon
  29.    set theNumber to text returned of result
  30.    try
  31.       if theNumber = "" then error
  32.       set theNumber to theNumber as number
  33.       exit repeat
  34.    on error
  35.       set thePrefix to "Пожалуйста, "
  36.       set theIcon to stop
  37.    end try
  38. end repeat
  39.  
  40.  
  41. repeat
  42.     tell application "GrowlHelperApp"
  43.  
  44.        notify with name "Сядь ровно" ¬
  45.          title "Сядь ровно" ¬
  46.          description "" ¬
  47.          application name "Сядь ровно" ¬
  48.  
  49.       delay theNumber*60
  50.   end tell
  51. end repeat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement