I was wondering if it would be possible to have TE like variables in text; e.g. Dear or Item price like $5 or $10 or $20 or pop-up menu etc.
At the moment I’m using “Insert text by pasting” KM action for various basic things like cell phone number etc. However, I would like to draft a couple of email snippets that would require inserting variables.
I have the following Apple script that will take the recipient’s first name and put it after “Dear” and I’m wondering how do I attach it to your macro.
I’m currently running this macro as a typed string “nm” - execute apple script - paste result.
tell application "System Events"
tell process "Mail"
tell text field “To:” 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