Annoyingly, iPhones don't have a great way to schedule messages. This around 100 lines of python to schedule iMessage texts from .txt files on your computer.
If this is useful to you, please give it a try and let me know what you think. Thanks.
If you don’t have an Apple computer but have an iOS device, you can also do something similar with the “Shortcuts.app” + “Calendar.app”.
I have a daily shortcut that runs at X time. Shortcut checks a calendar for events, if today contains one or more events. It will parse the text from these events (comma separated fully qualified phone numbers or iMessage accounts), and send the message contained in the body of the event.
Added bonus here is that I can also send group messages.
If I need to have the message sent on repeat, then I put the cal event on repeat.
I could possibly even have templated messages (ie, insert month and year into message), but I haven’t deep dived into that rabbit hole.
Downside here though is that you need an iOS device to always be on.
Last time i checked you need to swipe to confirm every time your automation attempts to send a message? kinda kills the automation part. I was shocked that there was almost nothing to be automated with messages on IOS as third party apps can't even read or send them. The Tasker app for android is great for this kind of thing.
Although if the script has some dependency on iOS or macOS specific function (ie, existence of “Apple script”). Then the shortcut might not be portable between macOS <-> iOS
I like reviewing my scheduled messages before sending (maybe the person has said something in the meantime), so the solution I came up with is a shortcut which first asks for text input, then a contact, then the time. All in the best possible interface in context, no need to worry about special syntax or formatting.
The message text is URL encoded, the phone number is auto-retrieved from the contact, then an sms: URL is generated and added to my reminders app. When the time comes, I simply click the link and it auto-populates in Messages, ready to send or tweak.
I like your solution a bit more because it doesn’t require scheduling this script to run on a cron or something. How do you URL encode the message? Could you share the whole shortcut
This could be insanely useful for me. Thank you! It means I could have a private monitoring approach that send myself a message on events I want notifications on? I didn’t even know iMessage allowed sending a self message.
I’ve built something similar with ios shortcuts. One shortcut that uses prompts and data jar to schedule and store messages. It also creates a cal event as a reminder to myself. It supports group texts. Then I have three automations that run in the morning, noon, and afternoon that check for scheduled messages and send them. Works well. Happy to share if interest.
Sometimes I’m up at 4am and want to send a message to someone at a reasonable hour when they’re not going to be in Do-not-Disturb mode, seems like a good enough way to accomplish. I use Slack “schedule tomorrow for 9am” pretty frequently for the same use case.
I use it more as a reminder system. Someone tells me to checkin next week or in a couple days and I can just schedule the text right then so I dont forget.
Unfortunately no, Apple has usage limits on iMessage / SMS relaying. Many people hack around this, SendBlue.co being the only long running service, but it's full of the graveyard of folks trying to do this.
What does this mean in practice? I leave my Messages app on my laptop open all day and correspond entirely through it with family. Since I'm typing I send messages rapidly at volume. I've never once hit a limit. Think hundreds of responses a day.
If an app running on my machine has subclassed the Messages app and is reading strings and sending hit strokes to the (Send) button on my behalf, how can Apple possibly rate limit this?
It's probably like those email providers that allows you some number of outbound emails per, but it's like 200 - 1000. High enough that most users won't ever notice, but low enough that there's no way to use the service commercially.
It can also work for SMSs with some changes in the applescript. We made a very similar tool that use to send automated SMSs to experiment participants 2 times per day. The setup is similar and there is a bash script that is called using cron twice per day and calls a matlab script (similar to the python script here) that calls an applescript. This is the applescript that, in practice, sends iMessage to those with iphone and SMS to those without
“For a Linux user, you can already build such a system yourself quite trivially by getting an FTP account, mounting it locally with curlftpfs, and then using SVN or CVS on the mounted filesystem. From Windows or Mac, this FTP account could be accessed through built-in software.”
People (and corporations) will pay a lot of money to have someone else manage and maintain their infrastructure.
This is cool. I like code like this that bandaids over someone's problems. I think all of us have things like this laying around, and it's always cool to be reminded of that fact.
I remember when all the basic non-smart phones, like the few Samsung flip phones I had when I first moved to Seoul has this very basic ability. This feature was been dropped in the transition to smart phones for some reason.
I'm honestly shocked that with all the ways iphone users are supposed to live in a better world than me, they lack this simple, obvious useful ability that the lowliest SMS/MMS user has.
In America iMessage has extremely strong network effects. I read about an Android user who carried around an iPhone specifically to avoid having a green bubble with dating prospects.
I have honestly never felt the need for this and had to click on a menu that I am ashamed to say I never thought of clicking on but yes, there it is. Scheduled send for SMS. You can even edit the time/ content right there in the UI.
Here's an Apple Script moving through iMessage to SMS if required. Make sure to add helpers to update the recipients contact to default to SMS, otherwise you're just cluttering your Messages history with failed messages.
--------
tell application "Messages"
set phoneNumber to "+15555555555"
set messageToSend to "This is a test!"
try
set iMessageService to (1st account whose service type = iMessage)
set iMessageBuddy to participant phoneNumber of iMessageService
if exists iMessageBuddy then
set theMessage to send messageToSend to iMessageBuddy
delay 2 -- Wait for a short time to allow the message status to update
if status of theMessage is not "delivered" then
error "iMessage not delivered"
else
log ("sent as iMessage to: " & phoneNumber)
end if
else
error "Not an iMessage user"
end if
on error
try
set SMSService to (1st account whose service type = SMS)
set SMSBuddy to participant phoneNumber of SMSService
send messageToSend to SMSBuddy
log ("sent as SMS to: " & phoneNumber)
on error
log ("ERROR: COULD NOT SEND TO: " & phoneNumber)
end try
end try
Comment is removed but my guess is that he's talking about the general very old flame war style stuff like "M$" and "Microshill" and "Crapple" etc. The "us vs them" mentality of computing.
No, I read it as son as it got posted, before it was removed and there was nothing about "crapple" in it or anything objectively ofensive or that broke HN rules.
The removed comment was basically along the lines of "when people say the word computer, they generally don't think of Apple" referring in this context to the fact that the app written by OP said it requires a "computer", giving the impression it's cross platform on all computers specifically, PCs which are still the majority marketshare in the computer space, yet it only works on macs, therefore it should be more specific about that restriction, which OP later corrected in the readme.
That's why I asked, since it seemed like he brought up a fair point that got unnecessarily attacked by someone going off topic and attacking him with false accusations about some imaginary crapple joke, plus a mob flagging it for no reason, which made me disappointed to see on this community.
Sometimes I feel like posts that are even remotely critical about Apple or Macs Apple on HN, get flagged and generally attacked in replies with hateful comments. I keep hoping people would be more objective and moderate here and less defensive about a favorite brand.
> Sometimes I feel like posts that are even remotely critical about Apple or Macs Apple on HN, get flagged and generally attacked in replies with hateful comments. I keep hoping people would be more objective and moderate here and less defensive about a favorite brand.
That is true of most of the organizations that have a large representation here on HN. A ton of people here work for those companies, the federal government or companies that directly contract (and depend) on those companies.
While I don't mind much if someone disagrees with me on HN I do notice that conversations surrounding certain topics, groups or companies get essentially brigaded and as a byproduct of that I typically avoid those discussions here.
I figure if the echo chamber wants/needs to talk to each other about how great Apple or Google is I just ignore it and it happen. Sure, there will be a post in a few weeks about how the same company stole their data or made them into a product, but they'll forget that and go back to singing corporate praise soon enough.
When real products or innovations come around you can see the way people react on the site as genuine. I look for those kinds of conversations and topics. If you ever get bored and want to be entertained go check out some of the hilariously bad product launches either Apple or Google have done and then go back and look at some of the conversations on HN about it.
I think there's just as much unreasonably anti-Apple activity on HN as there is pro-Apple -- if you think otherwise (in either direction), it's probably your bias showing.
I disagree. There are some people who are pretty knee deep in Apple ecosystems and sometimes they will complain about one piece of the system or even a specific component like the failing keyboard or a specific product decision like the notch.
But, they're "dug in" and they can't "un-Apple" all their stuff. They spend extra to buy a product that has components they think has serious problems that is operated and ran by a company that they routinely participate in discussions about them doing things at bad faith like killing webapps.
Also as someone who has done a few different product launches on HN you can tell instantly when you start getting metrics about page visits that HN skews extremely Apple. Your UA logs will be dominated by Safari and iOS agents as the hits come in from HN.
>I think there's just as much unreasonably anti-Apple activity on HN as there is pro-Appl
No there isn't. Pro-Apple comments don't get downvote bombed and flagged for no reason as much as those anti-Apple. If you don't see this it's your bias showing.
And what was "unreasonably anti-Apple" in that comment that it needed be flagged? By market share it's true, for most people saying "a computer" is gonna mean a PC, not just a Mac only.
Since neither of us actually have any data to show, it's more reasonable to assume that the anti- and pro-Apple behavior is equal than that one is more common. To proclaim, lacking any actual data, that one is more common and that it just happens to be the one that matches up with your preconception, suggests confirmation bias.
> And what was "unreasonably anti-Apple" in that comment that it needed be flagged?
Please show me where I said that comment was unreasonably anti-Apple, or that it deserved to be flagged.
If given the choice between writing AppleScript or Python I'm picking Python. Maybe Python can generate my AppleScript is really as close as I want to be to AppleScript.
That's actually my point. I don't want to reach for or keep in my brain a programming language (or frankly deep API) that can only ever matter to Apple products while I don't get paid to write the code by Apple.
I will gladly take Python instead and use it. A language used by millions to do almost anything with a vast amount of the code being written being shared not just the language and modules.
I do not have the time or interest to play with Apples little locked down language to keep their walled garden looking pretty.
I have a daily shortcut that runs at X time. Shortcut checks a calendar for events, if today contains one or more events. It will parse the text from these events (comma separated fully qualified phone numbers or iMessage accounts), and send the message contained in the body of the event.
Added bonus here is that I can also send group messages.
If I need to have the message sent on repeat, then I put the cal event on repeat.
I could possibly even have templated messages (ie, insert month and year into message), but I haven’t deep dived into that rabbit hole.
Downside here though is that you need an iOS device to always be on.