Last active
October 5, 2020 16:37
-
-
Save hagure/0dab00d3fca7bc2ddc2a12bc6786a83a to your computer and use it in GitHub Desktop.
[Get First Name of MailMate Recipient] Snippet uses Applescript to go into MailMate & get the first name of the Receiver (To) in the frontmost window. Useful for TextExpander Snippets. #applescript #textexpander
This file contains hidden or 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
tell application "System Events" | |
tell process "MailMate" | |
tell text field 1 of splitter group 1 of window 1 | |
if UI element 1 exists then | |
set theToRecipient to (value of UI element 1) | |
if (count words of theToRecipient) is greater than 0 then return word 1 of theToRecipient | |
end if | |
end tell | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I get the following error. Any hints?