Dear all,1. my phone is not rooted2. i have a csv file with 2 columns Name and PhoneNumber3. 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
> 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.
> 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??
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?
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)
> 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.
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 ]
--
--
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.
I want to get the number from the name of the person in my Callander event
I wanted to learn to fetch a record from an array which I'm trying but it's not working.
Yes they have space. So I even tried putting the name in single quotes but it didn't work
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.
--
Is there any other way to include the space or to find the record worth just a partial name? Can I use Rumi*?
Is there any other way to include the space or to find the record worth just a partial name? Can I use Rumi*?
> 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.
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...
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
Hmmm... I will have to look into what a 'null pointer exception' error is.
:-(
I'm not sure it will work for you.
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 mailThank 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>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.
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.
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
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 rooted2. i have a csv file with 2 columns Name and PhoneNumber3. 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.