#imessage

Habe mich heute mal an der Mac-Automatisierung per JavaScript versucht (guter Einstiegspunkt ist das JXA-Cookbook). Das ganze Unterfangen war allerdings ziemlich ernüchternd, da die Dokumentation innerhalb des Skript-Editors sehr unvollständig ist und die Schnittstellen teilweise einfach nicht funktionieren.

Ich wollte nämlich mal gucken, ob sich für iMessage to Friends nicht der Umstieg von AppleScript zu JavaScript anbieten würde und es sich dabei nicht gleich mit einer Konversations­auswahl ausstatten ließe. Aber 1. bringt der Umstieg auf JS bis auf ein bekannteres Umfeld genau gar nichts und 2. ist das Chat-Objekt von Messages auch unter El Capitan weiterhin kaputt. Und dass Apple das jemals fixt, darf mehr als bezweifelt werden.

iMessage to Friend for Alfred v2

When someone wrote me an email a few days ago asking about my Alfred extension „iMessage to Friend“ and if it will ever be available for Alfred v2, I was a little bit surprised. Then I realized that I totally forgot to release the updated workflow to the public. I mailed it to a bunch of people, who asked me about it on Twitter when v2 was released earlier this year and I use it on a daily basis myself, but because I’ve spent a lot of time studying and working on other projects (I’m talking about you, Jeffrey Jacob) I missed to write about it here. Sorry about that.

The updated „iMessage to Friend“ (1.2) works basically the same way as before, but the setup is a little bit different from the last version. You can download it from the new project page, where you’ll also find the setup instructions. Finally.

Alfred Workflow: iMessage to Friend


While working, everything can be a distraction: Twitter, email, your co-workers and texts from iMessage, of course. Answering your friends‘ texts will take you out of your workflow and after that, it takes minutes to get back into it.

That’s why I created the Alfred workflow „iMessage to Friend“, which allows you to directly write and send a message to a friend from within Alfred. Just hit Alfred’s hotkey, enter your friends (nick)name, write a message, hit enter and you’re done. No more clicking and application switching required. In order to use workflows you will need the Powerpack version of Alfred v2 or higher.

Download

iMessage to Friend.alfredworkflow
Version 1.3, 08.05.2021

If you are looking for the old extension for Alfred v1 click here.

Changelog

1.3 (08.05.2021): Add compatibility with macOS 11.0 Big Sur.
1.2 (05.10.2013): Add compatibility with Alfred v2 and higher.
1.1 (05.01.2013): Fixed bug in which the extension didn’t work properly, if your iCloud account isn’t the first account in iMessage’s account list. (thanks to @Cinematze for reporting)
1.0 (05.12.2012): First release of iMessage to Friend.

Known issues

If you have more than one iCloud account enabled in iMessage, the workflow will only work with the first one. Group chats aren’t possible, because they aren’t supported through iMessage’s AppleScript.

Installation

After you have installed/imported the workflow, you´ll have to replace two things:

1. Replace Friend1 (and so on) in the trigger’s keyword, title and subtext field with your friend´s (nick)name, e.g. BFF or kira:

2. Replace FRIEND1_IMESSAGE in the corresponding AppleScript action with your friend´s phone number or email address, e.g. 00491501234567 (country code + prefix + number) or friend@icloud.com. Keep in mind that the number or email address must be activated for iMessage and don’t remove the quotation marks:

Repeat these steps for your other friends. If you have more than five friends, feel free to add more by copying the trigger and actions.

Now you’re ready to go.

How to use it

If your friend´s name is Kira and you´ve entered her phone number or email address and changed the corresponding keyword to „kira“, hit your hotkey to open/enter Alfred and type something like:

kira Hello Kira, how are you?

This will send an iMessage with the text „Hello Kira, how are you?“ to Kira’s iMessage-enabled phone number or email address. It’s that simple.

Feedback

Feel free to leave a comment, if you have a question, discovered a bug or just want to say hi. You can also contact me on Twitter.

Alfred extension: iMessage to Friend

While working, everything can be a distraction: Twitter, email, your co-workers and texts from iMessage, of course. Answering your friends‘ texts will take you out of your workflow and after that, it takes minutes to get back into it.

That’s why I created the Alfred extension „iMessage to Friend“, which allows you to directly write and send a message to a friend from within Alfred. Just hit Alfred’s hotkey, enter your friends (nick)name, write a message, hit enter and you’re done. No more clicking and application switching required. In order to use extensions you will need the Powerpack version of Alfred.

Download

Old version! This version of „iMessage to Friend“ only works with Alfred v1. If you’re looking for the updated workflow for Alfred v2 click here.
iMessage to Friend.alfredextension
Version 1.1, 05.01.2013, for Alfred v1

Changelog

1.1 (05.01.2013): Fixed bug in which the extension didn’t work properly, if your iCloud account isn’t the first account in iMessage’s account list. (thanks to @Cinematze for reporting)
1.0 (05.12.2012): First release of iMessage to Friend.

Known issues

If you have more than one iCloud account enabled in iMessage, the extension will only work with the first one.

Installation

After you have installed the extension (by dragging it into the extension preference panel in Alfred), you’ll have to select the „iMessage to Friend“ extension and replace two things:

  1. Replace FRIENDS_NAME in the title, description and keyword field with your friend’s (nick)name, e.g. BFF or Kira.

  2. In the AppleScript text field replace FRIENDS_IMESSAGE with your friend’s phone number or email address, e.g. friend@icloud.com or 00491501234567 (country code + prefix + number). Keep in mind that this number or email address must be activated for iMessage.

Now you’re ready to go.

How to use it

If your friend’s name is Kira and you’ve changed the title, description and most important the keyword to „Kira“ (respectively „kira“), hit your hotkey to enter Alfred and type something like:

kira Hello Kira, how are you?

This will send an iMessage with the text „Hello Kira, how are you?“ to Kira’s iMessage-enabled phone number or email address. It’s that simple.

But wait, I have more than one friend

Congratulations, you’ve done something right in your life. If you also want to message them via Alfred, just repeat the installation process and enter another name for the extension (see the screenshot), another friend’s name and his contact information.

If you right click on the installed extension, you’re also able to change it’s name.

Feedback

Feel free to leave a comment, if you have a question, discovered a bug or just want to say hi. You can also contact me on Twitter.