Re: Want to get tasker to send an automated sms to a particular person on his birthday

861 views
Skip to first unread message

Soli

unread,
Jul 20, 2013, 9:07:40 AM7/20/13
to tas...@googlegroups.com
Thank you Sunil. Yes liked that app. However I still want to do it on tasker :)
Just to learn a roundabout way. Also if anyone can help me with a code to pull it from a csv file which had the name & contact no. (Via array/veriable)
I'm not too good at it so if someone could help with a small example giving step by step example. 


Warm regards,
Sent from my mobile. Kindly excuse brevity n errors. 



-------- Original message --------
From: sunil kolambkar <sunk...@gmail.com>
Date: 20/07/2013 5:07 PM (GMT+05:30)
To: tas...@googlegroups.com
Subject: Re: Want to get tasker to send an automated sms to a particular person on his birthday


There is very good app BIRTHDAY WISH FREE from Time Plus. Install, sync with your contacts.
You can even set individual time and msg for each contact using SMS or facebook.

 

On Friday, July 19, 2013 11:05:07 AM UTC+5:30, Soli Engineer wrote:
Dear all,
1. my phone is not rooted 
2. i have a csv file with 2 columns Name and PhoneNumber
3. i want to select the phone number of a particular person from the csv file in tasker.
e.g.
I can get tasker to get the birthday event of a particular person but i can't automate sending an sms directly through tasker as the sms recognizes only the phone number and not the Name of the person.
i am not very good at this so if someone can kindly help by giving me a step by step guidance on how to go about it in tasker.
Thank you in advance

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/SBV8gXIkHLc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Soli

unread,
Jul 20, 2013, 12:21:33 PM7/20/13
to tas...@googlegroups.com
Option 1 - I think there is some sqlite3 but not sure how to go about it. I even purchased sqlite but unfortunately it's different from sqlite3 :(
Option 2 - I have already tried and get a list of all the names and numbers I want to select the phone number from a veriable name fetched from my Callander so that I can automate a birthday greeting via an sms. My next step (if I succeed) is to fetch the email address and automate an email greeting
Thanks for your reply. Looking forward for your help. 


Warm regards,
Sent from my mobile. Kindly excuse brevity n errors. 



-------- Original message --------
From: Rich D <ricp...@gmail.com>
Date: 20/07/2013 9:04 PM (GMT+05:30)
To: tas...@googlegroups.com
Subject: Re: Want to get tasker to send an automated sms to a particular person on his birthday


> 1. my phone is not rooted 
> 2. i have a csv file with 2 columns Name and PhoneNumber
> 3. i want to select the phone number of a particular person from the csv file in tasker.

Option 1.
There have been several posts on how to access contact data with a script, I think this would be the best approach as you would not need to update your csv  file., however I can not recall if it required root or not..

Option 2.
It sounds like you have a tab delineated csv file from a contact export, I have not tried to split one of those but (hopefully someone who has may chime in)  it should not be to difficult. First,  the read file action can only read text files and I am not sure a csv qualifies for that. Second it may be easier if you export to a comma delineated file. I would think you could just copy and paste the contents into a text file or convert it to a text file. There is a Waring in the docs not to try to read a non text file.

Next I would build a separate task to test the splitting action. Start with one action and use the test button in the task edit window.

1. File / read file / : read your text file into global variable %Acontacts (I would use a global variable to start with for testing purposes,  this will allow you to view your splits in the variables tab, just be sure to change it back to a local variable after testing)

After running the task check the variable %Acontacts in the variables tab. This should show you what you are trying to split. 

Next add (Variable / Variable split ) action. You can not use a "tab" in the variable split action so you need to set a local variable to a "Tab" to be used as a splitter. Now you should have

1. Read file to %Acontacts
2. Variable set %tab to ( just press the tab button in the "To" field..)
3. Variable split %Acontacts ; splitter %tab

Now you can look in the variables tab and see what array has been created and where the info you are looking for is located..

Again, once you get what you want delete all created global variables and just make %Acontacts / %contacts.  

Rich D

unread,
Jul 22, 2013, 7:53:37 PM7/22/13
to tas...@googlegroups.com

> Option 2 - I have already tried and get a list of all the names and numbers I want to select the phone number from a veriable name fetched from my Callander so that I can automate a birthday greeting via an sms. My next step (if I succeed) is to fetch the email address and automate an email greeting

I am not sure if you are asking a question or not. Were you able to get the phone number from the csv file??

Soli Engineer

unread,
Jul 23, 2013, 1:18:17 AM7/23/13
to tas...@googlegroups.com
I now have 2 csv files.
1) contactNames
2) ContactNum
the names and the phone numbers match the corresponding record number for both the files.
can I get help in how to get the number of a particular person using an array. I'm not too good at it but want to learn. Thank you.
I tried the array pop and all other combinations but every time a different number gets selected.
if someone could send a xml file with dummy data it would become easier for me. thank you

Brandon Horwath

unread,
Jul 23, 2013, 2:04:09 AM7/23/13
to tas...@googlegroups.com
Array pop is tricky, it'll keep automatically filling element gaps for me so I literally need to pop the same position for a different variable (next in line) after an initial pop.

But, for me... I use a single file with names and numbers, meaning:

Wife@1234567890@Friend@1234567890... and so on.

Two reasons, one array is faster than two, and also it is easier to search contacts and change numbers. Rather than one file, counting spaces to contact element position, then hopefully counting correctly again in the number array... too much.

This method bases a contact number from %arr(?#%contact) to a variable, then the contact number is simply the next position in the array.

Sorry if this actually confuses you more!

Any questions?

Soli Engineer

unread,
Jul 23, 2013, 4:26:38 AM7/23/13
to tas...@googlegroups.com
Thanks Brandon I think this should work for me. I have understood what you explained but am not sure how to go about the array part. I would be extremely grateful if you could send me the task xml file so that I can import it and then try to learn from it. (If it's not too much of trouble for u)
Thanks again, eagerly waiting for your guidance.

Rich D

unread,
Jul 23, 2013, 6:18:49 AM7/23/13
to tas...@googlegroups.com

I would be extremely grateful if you could send me the task xml file so that I can import it and then try to learn from it. (If it's not too much of trouble for u)

There are many different ways to use an array , so to be able to help you need to be more specific on what you have so far and where you are stuck.
I will take a guess and assume we are at this point...

I have a CSV file that contains my contact name and phone number, I would like to be able to get the phone number given the contact name. I have been able to read the data into a variable %info and split it into an array. So I now have an array that looks like this..

%Info1= "mom"
%info2= "1234567"
%info3= "dad"
%info4="2345678"

I now I need a way to search the array and extract the number..

If this is the point you're at then, Assuming %name= "dad" you would use this action.

Variable set  %index to %info(#?%name)

// check the user guide under 'variables' in the array section for this action//

%index now contains the corresponding indices for "dad" in other words %index=3 so dad's phone number would be %info(%index+1)

Soli

unread,
Jul 23, 2013, 6:41:05 AM7/23/13
to tas...@googlegroups.com
I understood the logic but do not know the correct terms to use in variable array. Eg. Is the %index a builtin variable?  Will the set variable allow me to put %info(#?%name) in the field? 
Have I to put %info(#?%name) or the relevant name. 
I would be grateful if u send the xml file.  I shall make my data file as shown by you.  Thank you very much and sorry to bother you. Would be very helpful if u could send a xml file so I know exactly what to put

Warm regards,
Sent from my mobile. Kindly excuse brevity n errors. 



-------- Original message --------
From: Rich D <ricp...@gmail.com>
Date: 23/07/2013 3:48 PM (GMT+05:30)
To: tas...@googlegroups.com
Subject: Re: Want to get tasker to send an automated sms to a particular person on his birthday


--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.

Rich D

unread,
Jul 23, 2013, 7:06:02 AM7/23/13
to tas...@googlegroups.com

> I understood the logic but do not know the correct terms to use in variable array. Eg. Is the %index a builtin variable?

No, it is a local user variable.

 Will the set variable allow me to put %info(#?%name) in the field?

Yes, put it in exactly like that.. ( assuming you set %name to the name of the contact you are looking for)

> I would be grateful if u send the xml file.

I do not have one and if I were to make one I might as well just make the entire profile for you.. I think it would be better if you take our suggestions try them out and if they do not work post back with what you can not figure out..

Once you get something close you can post it here as well..

   Long press on the profile name / ( 3 dot menu with 4.0+ ) export / export description to clipboard (not XML)

The beginner mode needs to be off and the profile needs to have a name to be able to export.  

Soli Engineer

unread,
Jul 23, 2013, 8:04:16 AM7/23/13
to tas...@googlegroups.com

I think I've messed up embarrassingly :) to the point of being stupid
But want to learn this.
For testing I simply put a name directly but is not working

New (111)
A1: Read File [ File:ContactsCSV.csv To Var:%contactsArray ]
A2: Variable Split [ Name:%contactsArray Splitter:, Delete Base:Off ]
A3: Variable Set [ Name:%name To:Rumi Kasad Do Maths:Off Append:Off ]
A4: Variable Set [ Name:%index To:%info(#?%name) Do Maths:Off Append:Off ]
A5: Popup [ Title: Text:%index Background Image: Layout:Popup Timeout (Seconds):5 Show Over Keyguard:On ]

--

Mike L

unread,
Jul 23, 2013, 8:06:16 AM7/23/13
to tas...@googlegroups.com
A4 should be >>>  Variable Set [ Name:%index To:%contactsArray(#?%name) Do Maths:Off Append:Off ] 

Soli

unread,
Jul 23, 2013, 8:13:21 AM7/23/13
to tas...@googlegroups.com
I changed it according to what you said but %index still shows 0 :(


Warm regards,
Sent from my mobile. Kindly excuse brevity n errors. 



-------- Original message --------
From: Mike L <kitpri...@gmail.com>
Date: 23/07/2013 5:36 PM (GMT+05:30)
To: tas...@googlegroups.com
Subject: Re: Want to get tasker to send an automated sms to a particular person on his birthday


A4 should be >>>  Variable Set [ Name:%index To:%contactsArray(#?%name) Do Maths:Off Append:Off ] 

--

Michael Burke

unread,
Jul 23, 2013, 8:22:47 AM7/23/13
to tas...@googlegroups.com
variables are not necessary for what you want to accomplish 

First context day action category phone compose sms enter the number and message

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.

Soli Engineer

unread,
Jul 23, 2013, 8:27:13 AM7/23/13
to tas...@googlegroups.com

I want to get the number from the name of the person in my Callander event

Michael Burke

unread,
Jul 23, 2013, 8:26:36 AM7/23/13
to tas...@googlegroups.com
or just download go sms pro and schedule a message for his birthday

Mike L

unread,
Jul 23, 2013, 8:28:47 AM7/23/13
to tas...@googlegroups.com
Do the contact names have spaces like that in your .csv? Either that or Rumi Kasad is not in your list, as everything looks fine.

Soli Engineer

unread,
Jul 23, 2013, 8:29:29 AM7/23/13
to tas...@googlegroups.com

I wanted to learn to fetch a record from an array which I'm trying but it's not working. 

Soli Engineer

unread,
Jul 23, 2013, 8:31:05 AM7/23/13
to tas...@googlegroups.com

Yes they have space.  So I even tried putting the name in single quotes but it didn't work

On 23 Jul 2013 17:58, "Mike L" <kitpri...@gmail.com> wrote:
Do the contact names have spaces like that in your .csv? Either that or Rumi Kasad is not in your list, as everything looks fine.

--

Soli Engineer

unread,
Jul 23, 2013, 8:56:31 AM7/23/13
to tas...@googlegroups.com

Is there any other way to include the space or to find the record worth just a partial name? Can I use Rumi*?

Soli Engineer

unread,
Jul 23, 2013, 11:13:40 AM7/23/13
to tas...@googlegroups.com

Is there any other way to include the space or to find the record worth just a partial name? Can I use Rumi*?

Rich D

unread,
Jul 23, 2013, 4:29:07 PM7/23/13
to tas...@googlegroups.com

> Is there any other way to include the space or to find the record worth just a partial name?

Yes

Can I use Rumi*?

Yes, but  I would suggest *Rumi*

Have you checked the variables tab to see what is in %contactsArray and its array?? This should show you how to change your split action. 

Brandon Horwath

unread,
Jul 23, 2013, 7:32:00 PM7/23/13
to tas...@googlegroups.com
Soli,

I will export my task, and an edited file of contacts for your use when I can. RL is keeping me busy. But, I will add a link to those files for you when I can. That way you can see and play around with what works for my "name dial" array.

I should mention, it doesn't exactly work though, there is a bug where a variable array is not acceptable input for a call variable. So, I need to modify it to set the desired element to a standard variable and it should work again.

Give me some time tonight, I will have that ready. I wanted to add that to the thread on DroidX forums anyhow...

Soli

unread,
Jul 24, 2013, 7:55:06 AM7/24/13
to Brandon Horwath, tas...@googlegroups.com
Dear Brandon
I went through the profile. It's giving an error 'null punter excepting'. I guess it's because u r referring to %name which is not defined in the array


Warm regards,
Sent from my mobile. Kindly excuse brevity n errors. 



-------- Original message --------
From: Brandon Horwath <brandon...@gmail.com>
Date: 24/07/2013 12:59 PM (GMT+05:30)
To: tas...@googlegroups.com
Cc: Soli <engine...@gmail.com>
Subject: Re: Want to get tasker to send an automated sms to a particular person on his birthday


Thanks for waiting, sorry it took me so long to get this up. I deleted this task previously (forgot that) and needed to re-write it. I also messed up with my array search elements in the previous communications, it should have been something like %arr(#?contact), not ?#. That probably caused some difficulty for you, my apologies.

While I resolved the array pop issue, by eliminating it. I now have a new issue, when searching for contact names with multi-word entry, I cannot return any result for an array position.

This task works when a contact name is only one word, but for some reason (Anyone else care to assist?) I cannot track down the reason why an array position cannot be located when the element contains more than one word for a name.

NOTES ABOUT TASK AND PROFILE

1) Requires AutoVoice (Full version always best, could be adapted to work without)

2) TestContacts.txt can remain in downloaded folder. If moved, edit read file task to new file path.

3) Many of the flash tasks are unnecessary, I suggest once this issue is resolved simply flashing the name recognized once editing has taken place. I didn't include all the flash debugging actions I could have, but I did label all the relevant actions and as I said I just had to write this briefly from memory.

Oh yeah...
I realize now I eventually abandoned this task since my vehicle has a Bluetooth voice dial that is beyond genius. I hope to learn from the manufacturer how this was accomplished and script something into tasker, but I doubt I will see a line of code about that. I never followed up and had since moved onto other tasker needs since voice dialing for me was only critical while driving and my car does that better than I can.

But I'm interested again, and I know we can get this working perfectly for your needs. If nothing else it'll help gain some understanding of variables, arrays, and the uses thereof. Hopefully we'll both learn something.

On Tuesday, July 23, 2013 6:47:05 PM UTC-7, Soli Engineer wrote:
Thanks a ton Brandon, I've been trying this for a long time. Eagerly awaiting your file. 
Regards


Warm regards,
Sent from my mobile. Kindly excuse brevity n errors. 



-------- Original message --------
From: Brandon Horwath <brandon...@gmail.com>
Date: 24/07/2013 5:02 AM (GMT+05:30)
To: tas...@googlegroups.com
Subject: Re: Want to get tasker to send an automated sms to a particular person on his birthday


Brandon Horwath

unread,
Jul 24, 2013, 2:45:53 PM7/24/13
to tas...@googlegroups.com
But %name is defined as a included context variable, as per the new autovoice inclusions.

Hmmm... I will have to look into what a 'null pointer exception' error is.

Brandon Horwath

unread,
Jul 24, 2013, 3:16:00 PM7/24/13
to tas...@googlegroups.com
From what I can determine... it appears perhaps we are using two different (incompatible) versions of tasker

:-(

I'm not sure it will work for you.

Soli

unread,
Jul 25, 2013, 1:19:24 AM7/25/13
to tas...@googlegroups.com
The task description

___________
New (111)
A1: Read File [ File:Download/SampleContacts.csv To Var:%contactsArray ]
A2: Variable Split [ Name:%contactsArray Splitter:, Delete Base:Off ]
A3: HTML Popup [ Code:%contactsArray Layout:HTML Popup Timeout (Seconds):4 Show Over Keyguard:On ]
A4: Variable Set [ Name:%name To:*Elvis Presly* Do Maths:Off Append:Off ]
A5: Variable Set [ Name:%index To:%contactsArray(#?%name) Do Maths:Off Append:Off ]
A6: Popup [ Title: Text:%index Background Image: Layout:Popup Timeout (Seconds):5 Show Over Keyguard:On ]
A7: [X] Variable Section [ Name:%contactsArray From:41 Length:44 Adapt To Fit:On Store Result In:%mntemp ]
A8: Variable Search Replace [ Variable:%contactsArray Search:%index Ignore Case:On Multi-Line:On One Match Only:Off Store Matches In:%mntemp Replace Matches:Off Replace With: ]
A9: Popup [ Title:%mntemp Text:%mntemp Background Image: Layout:Popup Timeout (Seconds):1 Show Over Keyguard:On ] 

Warm regards,
Sent from my mobile. Kindly excuse brevity n errors. 



-------- Original message --------
From: Soli Engineer <engine...@gmail.com>
Date: 25/07/2013 10:31 AM (GMT+05:30)
To: tas...@googlegroups.com
Subject: Re: Re: Want to get tasker to send an automated sms to a particular person on his birthday


Dear Brandon
attached herewith is my xlm file along with the data file. I am able to find the record/Array number but cant fetch it via variable search :(
I shall also send the exported description in the following mail.
I'm sure now you would be able to help.
Thank you very much


On Thu, Jul 25, 2013 at 7:21 AM, Soli <engine...@gmail.com> wrote:
I'm having Version: 4.1u3m of Tasker. I thought it's the latest updated version. I had purchased it a long time back and then updated it as and when the new version was released. 
However I was able to make some progress in this profile. Not completely working though. But I'm sure you would be able to get it running. I shall send you my profile details so u could find out where I'm going wrong. I'm able to get the exact position of the required name from the array but am not able to fetch the array giving that record/position number in the search variable. It gives some other name. I shall send the profile in the next mail
Thank you very much for all the help


Warm regards,
Sent from my mobile. Kindly excuse brevity n errors. 



-------- Original message --------
From: Brandon Horwath <brandon...@gmail.com>
Date: 25/07/2013 12:46 AM (GMT+05:30)
To: tas...@googlegroups.com
Subject: Re: Want to get tasker to send an automated sms to a particular person on his birthday


From what I can determine... it appears perhaps we are using two different (incompatible) versions of tasker

:-(

I'm not sure it will work for you.

Brandon Horwath

unread,
Jul 25, 2013, 1:39:18 AM7/25/13
to tas...@googlegroups.com
Eek.

Okay, I see a few things off the bat to optimize.

I'll rewrite, upload, and post a description just in case.

Shouldn't take me too long :-)

But, gotta close shop right now. I will do that tonight.

Brandon Horwath

unread,
Jul 25, 2013, 6:19:24 AM7/25/13
to tas...@googlegroups.com
Edited New.tsk.xml

New (267)


A1: Read File [ File:Download/SampleContacts.csv To Var:%contactsArray ]
A2: Variable Split [ Name:%contactsArray Splitter:, Delete Base:Off ]

<Added this action (can be disabled)>
A3: Flash [ Text:# of Elements = %contactsArray(#) Long:Off ]
<Disabled this action>
A4: [X] HTML Popup [ Code:%contactsArray Layout:HTML Popup Timeout (Seconds):4 Show Over Keyguard:On ]
<I assume you are using some sort of vocal method to obtain this variable value somehow if you were to use this in a pratical application?>
A5: Variable Set [ Name:%name To:*Elvis Presly* Do Maths:Off Append:Off ]
A6: Variable Set [ Name:%index To:%contactsArray(#?%name) Do Maths:Off Append:Off ]
<added this condition. basically, perform next tasks if previous actions returned successful results.>
A7: If [ %index !~ %contactsArray0 ]
<Added this action (can be disabled)>
A8: Flash [ Text:%name found in position %index Long:Off ]
<disabled this action>
A9: [X] Popup [ Title: Text:%index Background Image: Layout:Popup Timeout (Seconds):5 Show Over Keyguard:On ]
<left disabled>
A10: [X] Variable Section [ Name:%contactsArray From:41 Length:44 Adapt To Fit:On Store Result In:%mntemp ]
<disabled this action>
A11: [X] Variable Search Replace [ Variable:%contactsArray Search:%index Ignore Case:On Multi-Line:On One Match Only:Off Store Matches In:%mntemp Replace Matches:Off Replace With: ]
<disabled this action>
A12: [X] Popup [ Title:%mntemp Text:%mntemp Background Image: Layout:Popup Timeout (Seconds):1 Show Over Keyguard:On ]
<added this action>
A13: Flash [ Text:Recognized name, %contactsArray(%index) Long:Off ]
<added this action>
A14: Variable Set [ Name:%number To:%index + 1 Do Maths:On Append:Off ]
<added this action (can be disabled)>
A15: Flash [ Text:%contactsArray(%index) is %contactsArray(%number) Long:Off ]
<added this action>
A16: Variable Set [ Name:%dial To:%contactsArray(%number) Do Maths:Off Append:Off ]
<added this action (can be disabled)>
A17: Flash [ Text:Dialing, %dial Long:Off ]
<added this action>
A18: Call [ Number:%dial Auto Dial:On ]
A19: End If

sunil kolambkar

unread,
Jul 25, 2013, 6:49:25 AM7/25/13
to tas...@googlegroups.com, Soli

Tasker, even today, not able to read Contacts Details. Not even in Root. (As I know)

So Finding something (Birthday) from a Contact and so comparing Name/Number can't be done.
If you have say 3 Column CSV, (Name / Number / B Date) using read file, split Variables, I think you can get what you want to do.

You can then compare the %DATE with file D Date and send SMS. 

Sunil


On Saturday, July 20, 2013 6:37:40 PM UTC+5:30, Soli Engineer wrote:
Thank you Sunil. Yes liked that app. However I still want to do it on tasker :)
Just to learn a roundabout way. Also if anyone can help me with a code to pull it from a csv file which had the name & contact no. (Via array/veriable)
I'm not too good at it so if someone could help with a small example giving step by step example. 


Warm regards,
Sent from my mobile. Kindly excuse brevity n errors. 



-------- Original message --------
From: sunil kolambkar <sunk...@gmail.com>
Date: 20/07/2013 5:07 PM (GMT+05:30)
To: tas...@googlegroups.com
Subject: Re: Want to get tasker to send an automated sms to a particular person on his birthday


There is very good app BIRTHDAY WISH FREE from Time Plus. Install, sync with your contacts.
You can even set individual time and msg for each contact using SMS or facebook.

 

On Friday, July 19, 2013 11:05:07 AM UTC+5:30, Soli Engineer wrote:
Dear all,
1. my phone is not rooted 
2. i have a csv file with 2 columns Name and PhoneNumber
3. i want to select the phone number of a particular person from the csv file in tasker.
e.g.
I can get tasker to get the birthday event of a particular person but i can't automate sending an sms directly through tasker as the sms recognizes only the phone number and not the Name of the person.
i am not very good at this so if someone can kindly help by giving me a step by step guidance on how to go about it in tasker.
Thank you in advance

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.

Soli

unread,
Jul 25, 2013, 8:53:05 AM7/25/13
to sunil kolambkar, tas...@googlegroups.com
I have been able to get the name of the person from the Callander event into tasker variable. The only problem is to get the corresponding number. For this I made a csv file and am trying to get the number through an array. I am also able to get the position of the array. But when I use variable select or variable section or variable search I am not able to get the result number. Probably I'm not knowing how to call it in an array. If u go through the xml which I have attached earlier u would get a clear picture of where I may be going wrong. 
Thank you
Reply all
Reply to author
Forward
0 new messages