Guest User

JDownloader Notification Script (MacOS)

a guest
Oct 13th, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on run argv
  2.        
  3.         set argCount to count of argv
  4.        
  5.         try
  6.                 set varMessage to ((item 1 of argv) as text) -- notification
  7.                 set varNotification to ((item 2 of argv) as text) -- title
  8.                 set varHeadline to ((item 3 of argv) as text) -- subtitle
  9.                 set varSoundName to ((item 4 of argv) as text) -- sound name
  10.         end try
  11.        
  12.         if argCount = 1 then
  13.                 display notification varMessage
  14.         else if argCount = 2 then
  15.                 display notification varMessage with title varHeadline
  16.         else if argCount = 3 then
  17.                 display notification varMessage with title varHeadline subtitle varNotification
  18.         else if argCount = 4 then
  19.                 display notification varMessage with title varHeadline subtitle varNotification sound name varSoundName
  20.         end if
  21.        
  22. end run
Add Comment
Please, Sign In to add comment