Created
August 3, 2020 09:42
-
-
Save OKsign/e98506dbd34f07c35e5a77958c31a503 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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