본문 바로가기

Tech & Usability

[Mail 플러그인 #4] 지인에게 Mail이 오면 Alex가 알려줘요!

Mail.app은 UI는 단순하지만 의외로 많은 게 가능합니다.


오늘은 주소록에 있는 사람에게 메일이 오면 음성 알림기능을 구현해봅시다. 원문은 http://www.macosxhints.com/article.php?story=2008012419354669 을 참조해주세요.


1. Script Editor를 켭니다. 

Script Editor는 아래 경로에 있습니다.

/Applications/AppleScript/Script Editor


2. 아래 내용을 복사하여 Script Editor에 붙여 넣습니다.


using terms from application "Mail"

on perform mail action with messages newMessages

repeat with newMessage in newMessages

tell application "Mail"

set senderName to (extract name from sender of newMessage)

say "You've just received an email from " & senderName

end tell

end repeat

end perform mail action with messages

end using terms from



3. 저장합니다. 

파일이 변경되면 작동하지 않아서 저는 아래 경로에 저장하였습니다.

~/Library/Scripts/Applications/Mail


4. Mail.app 메뉴의 Preferences의 Rules 탭으로 가서, Add Rule을 선택합니다.




5. Description 부분에 제목 제목을 붙이고 따라해주세요.

Run AppleScript 우측에는 Choose 버튼을 누르고 아까 만든 스크립트 파일의 경로를 지정해주시면 됩니다.





6. OK 버튼을 누르시면 아래처럼 Rule이 추가되었습니다.




7. 이제 주소록에 저장된 사람들로부터 메일이 오면 Alex의 목소리를 들으실 수 있을 겁니다. 이렇게요.

"You've just received an email from 사람이름" 아쉽게도 한글인 경우 읽어주지 못하는군요. 바보같은 Alex ㅋ. 그래도 꽤나 쓸만 합니다.


### updated ###

2009-05-29 | 05:57 AM

Script Editor를 쓰기 귀찮으신 분이 있으실까봐 스크립트파일 첨부합니다.   



### 관련글 ###