Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
-- user input
set sound_user to "/Volumes/Data/mp3/123.mp3"
set time_sound to 4 -- seconds
set text_noti to "Mail from Jane"
set title_noti to "Read Carefully"
-- end of user input
-- user options
set sound_option to "on" -- "on" or "off"
-- end of user options
display notification text_noti with title title_noti
if sound_option is "on" then
do shell script "afplay -t " & time_sound & " " & quoted form of sound_user
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment