Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. tell application "Mail"
  2. set outgoingMessage to make new outgoing message
  3. set fontFace to "Times"
  4. tell outgoingMessage
  5. set the content to " "
  6. set font of content to fontFace
  7. set size of content to (14)
  8. set visible to true
  9. end tell
  10. end tell
  11.  
  12. try
  13. try
  14. set old to the clipboard
  15. end try
  16. set html to quoted form of "<span style="font:14px 'Monaco'">&nbsp;</span>"
  17. do shell script "echo " & html & " | textutil -format html -convert rtf -stdin -stdout | pbcopy -Prefer rtf"
  18. tell application "System Events" to keystroke "v" using command down
  19. delay 0.03
  20. set the clipboard to old
  21. end try
  22.  
  23. try
  24. try
  25. set old to the clipboard
  26. end try
  27. tell application "System Events" to keystroke "c" using command down
  28. delay 0.03
  29. set input to Unicode text of (the clipboard as record)
  30. set txt to quoted form of ("<span style="font:14px 'Monaco'">" & input & "</span>")
  31. do shell script "echo " & txt & " | textutil -format html -convert rtf -stdin -stdout | pbcopy -Prefer rtf"
  32. tell application "System Events" to keystroke "v" using command down
  33. delay 0.03
  34. set the clipboard to old
  35. end try
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement