Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. using terms from application "Messages"
  2.  
  3. on message sent theText with theTexte
  4.  
  5. end message sent
  6.  
  7. on active chat message received from theBuddy for theTextChat with theText
  8. decrypt(theText)
  9. end active chat message received
  10.  
  11. end using terms from
  12.  
  13. on decrypt(message)
  14. if message begins with "-----BEGIN PGP MESSAGE-----" then
  15. tell application "TextEdit"
  16. activate
  17. set theDocument to make new document
  18. set text of theDocument to message
  19. end tell
  20.  
  21. tell application "System Events"
  22. keystroke "a" using command down
  23. keystroke "d" using {command down, shift down}
  24. end tell
  25. end if
  26. end decrypt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement