imsg icon indicating copy to clipboard operation
imsg copied to clipboard

Ability to message yourself

Open skela opened this issue 10 years ago • 5 comments

It would be good to be able to message yourself using imsg. That way you could write scripts, that used imsg, to notify you when they are complete etc.

skela avatar Nov 10 '14 04:11 skela

That's a cool idea! It's already possible to do that, but I think it would be handy to have an one-line command that would send the message to yourself.

I'll mark that as an enhancement so that I can work on that when I have time. Feel free to issue a pull request if you feel like it! :smile:

chrisfsampaio avatar Nov 12 '14 17:11 chrisfsampaio

I had a quick look at it myself, if I try something like:

osascript -e 'tell application "Messages" to send "This is a message" to buddy "Alek Slater"'

I get the following error:

31:78: execution error: Messages got an error: Can't send a message to yourself. (1)

skela avatar Nov 16 '14 05:11 skela

I'll keep playing with it to see if I can find a command that works. My knowledge of osascript and ruby are very limited though. Is there a way to ask the Messages app which commands it accepts via osascript?

skela avatar Nov 16 '14 05:11 skela

Yes, you can open the application 'AppleScript', then go to 'open dictionary' and then select the Messages application 😊

— Sent from Mailbox

On Sun, Nov 16, 2014 at 3:31 AM, Alek Slater [email protected] wrote:

I'll keep playing with it though to see if I can find a command that works. My knowledge of osascript and ruby are very limited though. Is there a way to ask the Messages app which commands it accepts via osascript?

Reply to this email directly or view it on GitHub: https://github.com/chrisfsampaio/imsg/issues/37#issuecomment-63205357

chrisfsampaio avatar Nov 16 '14 13:11 chrisfsampaio

Wow, excellent, always wondered how people somehow knew what to tell applications to do.

skela avatar Nov 17 '14 02:11 skela