Activate Messages App - Focus on Buddy -or Group

Hello!

I'd like to design a macro that:

  1. Activate Messages
  2. Focus (select, highlight?) a single person -OR- a group message
  3. Most of the solutions on this forum uses email address, but most of my buddies are designated by phone number

Here is a 30sec. video I made to showcase the workflow I am after :slight_smile:

I found this on the forums, but it "targets" email address vs. phone number and I couldn't quite get it to work. :grimacing:

set targetBuddyHandle to "name@email.com"

tell application "Messages"
  if not running then run
  activate
  set thisBuddy to first buddy whose handle is targetBuddyHandle and service type of service of it is iMessage
  set thisChat to make new text chat with properties {participants:{thisBuddy}}  
end tell

Thank you!