Is there a way to schedule a text to send from mac?

Discussion in 'Mac Apps and Mac App Store' started by improver, Dec 21, 2014.

  1. improver macrumors newbie

    Joined:
    Nov 26, 2013
    #1
    Hi Guys

    As you are all no doubt away you can now send text messages from your macs yeah.

    You are probably also aware that with an android, windows or blackberry smart phone you can schedule a text message whilst with an apple you cannot. Booo

    There is a thread on this very topic here http://forums.macrumors.com/showthread.php?t=980027

    So my question is this, is it possible to schedule a text message to send from my mac in advance. Here are a couple of examples where this could be handy.

    Example 1 - You know you will be driving at 12 mid-day but you also know your husband/wife/partner will be just leaving work at that time and want to remind them to pick up something on their way home. You remember this at say 10:30am you cant call him/her because they are in work and wont answer and you dont want to text them whilst they are busy (as you knwo they will likely have forgotten by the time they leave work. so you schedule a text to send on its own at 12 mid-day.

    Example 2 - You are working late and at 3am you have a fantastic idea you need your business partner to act on, but you know they are asleep in bed so you set a text to send to them at 10am maybe something like this, "Hey Jake I really need you to read the report Ive left on your desk and action the point on page 3 Ive highlighted, Ive been working through the night so will be asleep until mid-day"

    Example 3 - You want to set up a text to your friend for his birthday and schedule it to send but you will be out of the country leaving your phone at home (so unable to press the button on the day), so why not schedule it in and let the phone or mac take care of it?

    I know from the very old iphone thread this is an issue for a lot of people, I am amazed there has so far been no actual solution other than to jail break the phone (which is looking like what I am going to have to do at this rate) please if you do know the solution to this please let me know.
     
  2. cruisin macrumors 6502a

    cruisin

    Joined:
    Apr 1, 2014
    Location:
    Canada
    #2
    The Mac way would be a Applescript/Automator task of some kind and then triggered by the calendar. The half-solution is to get the Reminders app to remind you to send the message. Google Calendar sends a SMS but only to you.
     
  3. cruisin macrumors 6502a

    cruisin

    Joined:
    Apr 1, 2014
    Location:
    Canada
    #3
    After some effort and finding some references, I got it to send a text using SMS Relay (OSX 10.10 only feature):
    Code:
    tell application "Messages"
    	set targetBuddy to "12345556789"
    	set textMessage to "This is a test"
    	set targetService to id of service "SMS" -- OSX 10.10 has SMS option
    	
    	set theBuddy to buddy targetBuddy of service id targetService
    	send textMessage to theBuddy
    end tell
    Save this in Script Editor as an application (.app extension). Essentially if you make a script per number and message it will work. There is supposed to be a universal version possible where you make a script that takes a number and a message but I never got it to work.

    In Automator make a new calendar alarm. Then use calendar > new calendar event. Make the alarm be to open your something.app that you just made.

    It should work as it did for me. Hope this helps.
     
  4. improver thread starter macrumors newbie

    Joined:
    Nov 26, 2013
    #4
    Hi I REALLY want to be able to schedule text messages, I tend to write them on my mac anyway so this would be great if I could do that as I often work late at night and I have staff that start very early in the morning so I want to be able to send them reminder texts for when they start work (and not be waking them up in the middle of the night when I'm working) and not have to get up as early as they do myself. You seem to have com accross the best solution I have seen yet however I do not know how to save that code as an application I need more of an idiots step by step guide please can you help?
     
  5. cruisin macrumors 6502a

    cruisin

    Joined:
    Apr 1, 2014
    Location:
    Canada
    #5
    The old way was to open Script Editor, put in the code (change the number and message), hit File > Export and make sure the file type was application. Then in Calendar you choose a local calendar (must be the one that says "On My Mac" and not "iCloud") you would make a new event with a custom alert (custom > open file > other...).

    Things have changed a bit in OSX 10.12 as the custom alert will now complain that you are opening a new application for the first time (the one from Script Editor so this is true) but it only complains at the time the calendar event takes place, defeating the point of the scheduled sms. I never checked 10.11 but I assume it has the same issue as it added a few extra security features. Feel free to try sending something to yourself as a test.

    You can still schedule the application or even the base script with a cron job (https://apple.stackexchange.com/que...-run-an-applescript-at-a-specific-time-caveat) but you either need to use terminal or you need a additional app like LaunchControl (http://www.soma-zone.com/LaunchControl/).

    Or if you know that you want the message to go out in 5 hours (for example), you can use Automator to set a delay. I added a sample Automator file that prompts for the number and the message and then has a 10 second delay. It only does one scheduled text at once for now, but it should be possible to send multiple on a delay.
     

    Attached Files:

Share This Page