Hello there.
I'm trying to make a script that would launch when a process ends and send a message to my iPhone.
This is what I have so far:
Script works as it is, problem is when commenting first "set me" and uncommenting the second one, that I get:
execution error: Messages got an error: Can't send a message to yourself. (1)
Why doing it then, you'd ask. Well, thing is that if I send from my apple id to my cell phone number, in my phone appear two different conversations. One for the sent and another one for the received. And that's pretty annoying to be honest.
And if I open a new conversation with my apple id from my apple id directly from the app (which returns the error in the script) I have what I intend. One single conversation in my phone that show both the sent and received message.
Any ideas?
Thanks!
I'm trying to make a script that would launch when a process ends and send a message to my iPhone.
This is what I have so far:
Code:
#!/usr/bin/osascript
set me to "123456789"
#set me to "XXXXXX@gmail.com"
set appleid to "E:XXXXXX@gmail.com"
set today to current date
set currentDayNumber to day of today as string
set currentMonthName to month of today as string
set currentYear to year of today as string
set theDate to (currentMonthName & " " & currentDayNumber & ", " & currentYear & ".")
set theTime to time string of (current date)
set mssg to "Process finished at " & theTime & ", " & theDate
tell application "Messages"
activate
send mssg to buddy me of service appleid
end tell
Script works as it is, problem is when commenting first "set me" and uncommenting the second one, that I get:
execution error: Messages got an error: Can't send a message to yourself. (1)
Why doing it then, you'd ask. Well, thing is that if I send from my apple id to my cell phone number, in my phone appear two different conversations. One for the sent and another one for the received. And that's pretty annoying to be honest.
And if I open a new conversation with my apple id from my apple id directly from the app (which returns the error in the script) I have what I intend. One single conversation in my phone that show both the sent and received message.
Any ideas?
Thanks!