Send SMS with different text everyday

ajneo7

New member
I have word file which has 365 sentences. And I want to send SMS to a person everyday at a specific time, with one sentence from that word file.
Please help me out if this is possible
 

Jacob L

Moderator (Lawsonator)
Put each sentence with a comma between them. Then use the text manipulation action to replace the comma with a \n which is newline and store them in a variable. Then use regex to extract only the sentence, into another variable and use that variable as the SMS content. then replace the first variable with the SMS content. You should also trim white space of the SMS content to avoid crashes. I would like the sentences, maybe I can just build it as it will need debugging as well. Use the day/time trigger
 

ajneo7

New member
Put each sentence with a comma between them. Then use the text manipulation action to replace the comma with a \n which is newline and store them in a variable. Then use regex to extract only the sentence, into another variable and use that variable as the SMS content. then replace the first variable with the SMS content. You should also trim white space of the SMS content to avoid crashes. I would like the sentences, maybe I can just build it as it will need debugging as well. Use the day/time trigger
Thanks for the response Jacob.

I'm new to Macrodroid not aware of all the functions.
I've got a fair idea from your response. But still not sure like which function to use to fetch a sentence from word file to a variable.

And my next challenge is this - Imagine below is my content in the text file and have separated the sentences with comma.
----------------
This is the content that should be sent on first day,This is the content that should be sent on second day
----------------

On the first day I need to send the first sentence via SMS, on next day the second sentence and so on.
So not sure how to achieve this.
 

ajneo7

New member
I made it: http://www.macrodroid.com/macrostore?id=9698
If link fails, type id=9698 into the MacroDroid store. Let me know if anuthing is unclear or there are any bugs. Remember to enable the action 'Send SMS'. Click it and choose enable then press the tick or plus button to save it.
A big thanks Jacob for taking your time to configure this macro!!!

I tried the macro with the below test sentences, and the second sentence was picked first for SMS
------------
This is my sentence1,this is my sentence2
-------------

There are few things which were not clear -
As of now I can see 3 local variables - sentences, SmsContent, SmsNumber

1. In the first text manipulation, from sentences variable we are replacing , with \n and putting it back to sentences.
So on the second day, won't it run again and look for , to replace?

2. In the second text manipulation, I'm unclear what the .+ regex do?

3. In the third text manipulation, why are we replacing the sentences with SmsContent?
 
Top