JMichaelTX https://forum.keyboardmaestro.com/u/jmichaeltx
May 30
retroriff:
Hello, I tried it but didn't help. Actually it is not pasting my content,
so I guess that the function is not correct. Sorry, I am not a developer
and I am confused using Script Editor
Please post the exact script you used in the Script Editor, Put it in a
forum Code Block
https://forum.keyboardmaestro.com/t/how-to-paste-script-or-text-in-a-code-block/10091
.
I did not give you the full script above; only the changes. So, to be
clear, here's the full script:
tell application "Airmail 3"
set oMsg to selected message
(*
If the above fails, try this:
set msgList to selection
set oMsg to item 1 of msgList
*)
tell oMsg
--- sender property should be in this format ---
-- "Sender Name name@domain.tld"
set senderStr to sender
--- Separate sender into Sender Name and Address ---
set AppleScript's text item delimiters to {" <", ">"}
set oSender to text items of senderStr
set senderName to item 1 of oSender
set senderAddr to item 2 of oSender
end tell
end tell
return senderName
Note that it does NOT paste anything. It simply returns the senderName to
the Script Editor Event Log (which you may need to enable).
Run this in Script Editor.
If it fails, then please post:
- Exact error message
- Line that it failed on.
When you are viewing the AirMail scripting Dictionary, enter "message" into
the search box, and then screen capture the results.