Missed Call count and SMS using tasker - Tasker Tips & Tricks

Hi,
I'm not a newbie in tasker but currently at beginners level.
What i'm thinking is a way to send sms to a contact whenever i get a missed call but the sms text depends upon the number of calls missed in the past hour.
So what i want to do is to store all missed calls in a seperate file and update it the moment i miss a call alongwith the number of times in the past hour but clear it at the end of the day, then reply through sms based on number of times missed.
Times 1 - Sms text : i'm busy, will call you back soon
Times 2 - Sms text : i really cant pick up your calls
Times 3 - Sms text : this is your third time. If you call again i'll hunt you down and kill you
Times 4 & 4+ - Do nothing.
Thanks in advance

I'm not sure what's the question here.
You have all the logic, all you need is to try and convert it to actions in Tasker.
Try something, and come back with a specific question of what fails etc. Or post your description so we can help you.
---------- Post added at 08:18 PM ---------- Previous post was at 08:10 PM ----------
sbetatester said:
What i'm thinking is a way to send sms
Click to expand...
Click to collapse
Your last action for profile 1.
Rough breakdown:
sbetatester said:
to a contact whenever i get a missed call
Click to expand...
Click to collapse
Profile 1: received missed call
sbetatester said:
but the sms text depends upon the number of calls missed in the past hour.
Click to expand...
Click to collapse
Entry task to profile 1 to check how many times you got a call
sbetatester said:
store all missed calls in a seperate file
Click to expand...
Click to collapse
From the entry task, call this task to store numbers. I'd suggest one file per mobile number.
sbetatester said:
update it the moment i miss a call
Click to expand...
Click to collapse
This was as before, profile 1...
sbetatester said:
alongwith the number of times in the past hour
Click to expand...
Click to collapse
This can be in the above stored file with appropriate conditions.
sbetatester said:
but clear it at the end of the day
Click to expand...
Click to collapse
Profile 2: time context to delete all files
sbetatester said:
then reply through sms based on number of times missed.
Click to expand...
Click to collapse
Perform this task at the end of your entry task.
sbetatester said:
Times 1 - Sms text : i'm busy, will call you back soon
Times 2 - Sms text : i really cant pick up your calls
Times 3 - Sms text : this is your third time. If you call again i'll hunt you down and kill you
Times 4 & 4+ - Do nothing.
Click to expand...
Click to collapse
Your if conditions for the above task.

sumotori1 said:
I'm not sure what's the question here.
You have all the logic, all you need is to try and convert it to actions in Tasker.
Click to expand...
Click to collapse
Thanks for the rough breakdown.
The problem i was facing was with the variable set commands.
Anyway NVM, i'll just construct a profile first and post here to enable further discussions.

Don't get me wrong, I'm happy to help. Just need something a little more specific.
When you say you have an issue with variable set, what exactly is the issue? Keeping track of the variable in terms of calls? Actually setting a variable?
My first idea to your problem would be to write a file with filename the number that called and content to be appended as %TIME (this the file would have the times that person called). The number of lines in that file, naturally, is the total number of calls you've received (although it's a bit more advanced to extract the number of lines, can certainly help with that). Thus you don't need a global variable. For that.

sumotori1 said:
Don't get me wrong, I'm happy to help. Just need something a little more specific.
When you say you have an issue with variable set, what exactly is the issue? Keeping track of the variable in terms of calls? Actually setting a variable?
My first idea to your problem would be to write a file with filename the number that called and content to be appended as %TIME (this the file would have the times that person called). The number of lines in that file, naturally, is the total number of calls you've received (although it's a bit more advanced to extract the number of lines, can certainly help with that). Thus you don't need a global variable. For that.
Click to expand...
Click to collapse
The real problem here is that i'm unfamiliar with the variables since i'm not a IT grad.
This would be my second tasker application as i'm still at beginners level as mentioned in OP. So, i'll just give it a try based on tutorial and videos i have watched In the meanwhile before asking for help.
Thanks once again for your time.

I see. Then this is also a good place to start from. : )
If a variable has all its letters lower case, it is only available within the task in which it is specified. Once task is finished, variable is erased from memory.
If the variable has at least one capital letter, it becomes a so called global variable. This means you can access it's value from anywhere in Tasker.
This will help you get started. Start with something simple to understand how variables work. Slowly move to something more elaborate.
---------- Post added at 03:35 PM ---------- Previous post was at 03:18 PM ----------
I see. Then this is also a good place to start from. : )
If a variable has all its letters lower case, it is only available within the task in which it is specified. Once task is finished, variable is erased from memory.
If the variable has at least one capital letter, it becomes a so called global variable. This means you can access it's value from anywhere in Tasker.
This will help you get started. Start with something simple to understand how variables work. Slowly move to something more elaborate.

sumotori1 said:
I see. Then this is also a good place to start from. : )
If a variable has all its letters lower case, it is only available within the task in which it is specified. Once task is finished, variable is erased from memory.
If the variable has at least one capital letter, it becomes a so called global variable. This means you can access it's value from anywhere in Tasker.
This will help you get started. Start with something simple to understand how variables work. Slowly move to something more elaborate.
---------- Post added at 03:35 PM ---------- Previous post was at 03:18 PM ----------
I see. Then this is also a good place to start from. : )
If a variable has all its letters lower case, it is only available within the task in which it is specified. Once task is finished, variable is erased from memory.
If the variable has at least one capital letter, it becomes a so called global variable. This means you can access it's value from anywhere in Tasker.
This will help you get started. Start with something simple to understand how variables work. Slowly move to something more elaborate.
Click to expand...
Click to collapse
Hi once again,
I did a workout based on the information collected from various sources and made this.
Now could you suggest how can i count the number of times person called in a specific hour because if another person calls between the first, the count resets.
Basically, i just have to store %TIME variable alongwith the number and compare time of last 3 and last entry
If within one hour count =1/2/3 then execute commands else ignore.

That looks quite good for a first effort!
Couple of points:
1. No need to save the number both as the file name and the file contents. It's redundant.
2. The if statements in the end, can be combined in a long if else if statement (as you've done before).
3. You are right, since your variable Counter is not specific to a number, it will get cleared when another number calls.
I combined points 1 and 3 above, and decided to save the time and the counter variable inside your file instead. Please see my attached task. It looks complicated, but once you know Tasker flow you can make it work. Not sure if this is the best implementation I've done.
Please also note how I have tried to include as many comments, for you to be able to follow what I am doing and try to debug it if you face issues. Before tinkering with it, try to understand it. You might find mistakes in there!
Time I've used is 4hrs, but you can reduce that

sumotori1 said:
That looks quite good for a first effort!
Couple of points:
1. No need to save the number both as the file name and the file contents. It's redundant.
Click to expand...
Click to collapse
I originally planned %CNUM % TIME but I guess you are right as the file name itself tells the number.
sumotori1 said:
2. The if statements in the end, can be combined in a long if else if statement (as you've done before).
Click to expand...
Click to collapse
Yup, i realised it later on.
sumotori1 said:
3. You are right, since your variable Counter is not specific to a number, it will get cleared when another number calls.
I combined points 1 and 3 above, and decided to save the time and the counter variable inside your file instead. Please see my attached task. It looks complicated, but once you know Tasker flow you can make it work. Not sure if this is the best implementation I've done.
Click to expand...
Click to collapse
The solution you came up with was although different from mine but it was time saving and simple in terms of coding for you because i guess reading the number of lines then storing last line and 3 lines above the last line would become more complex.
sumotori1 said:
Please also note how I have tried to include as many comments, for you to be able to follow what I am doing and try to debug it if you face issues. Before tinkering with it, try to understand it. You might find mistakes in there!
Click to expand...
Click to collapse
Thank you so much for the detailed explanation. It made the hard code easy enough to be understandable by anyone.
However, even with the help of your explanations it took me 2 hours to understand the splitter variable but i finally got it. Now i just have to practice split with a few examples
sumotori1 said:
Time I've used is 4hrs, but you can reduce that
Click to expand...
Click to collapse
I have modified the file according to my needs. Once again thanks for your time and wisdom.
Lastly, i'll modify it to save %CNAME as file name instead of %CNUM because my event context is Missed Call from contacts only and if the same person calls from another one of his number %CNUM won't work.

sbetatester said:
However, even with the help of your explanations it took me 2 hours to understand the splitter variable but i finally got it. Now i just have to practice split with a few examples.
Click to expand...
Click to collapse
Hah, yes this is a tricky one.
sbetatester said:
I have modified the file according to my needs. Once again thanks for your time and wisdom.
Click to expand...
Click to collapse
You're most welcome.
sbetatester said:
Lastly, i'll modify it to save %CNAME as file name instead of %CNUM because my event context is Missed Call from contacts only and if the same person calls from another one of his number %CNUM won't work.
Click to expand...
Click to collapse
Yes, in this context, CNAME will work a lot better and also create a better visual structure in your file system. Good thought!
Perhaps you can also put all the files in an additional subfolder, instead of the Tasker base folder. Maybe CallLogs folder or something. Then, every night, you can clear all files in the folder like this (task attached):
Code:
PurgeFiles (296)
<List all files in your desired directory.>
A1: List Files [ Dir:Tasker/CallLogs Match: Include Hidden Files: Off Use Root: Off Sort Select: Alphabetic Variable:%filelist ]
<For loop for the length of items in your file list>
A2: For [ Variable:%counter Items:1:%filelist(#) ]
<Delete the file>
A3: Delete File [ File:%filelist(%counter) Shred Level: 0 Use Root: Off ]
<End for - delete loop>
A4: End For

sumotori1 said:
Perhaps you can also put all the files in an additional subfolder, instead of the Tasker base folder. Maybe CallLogs folder or something. Then, every night, you can clear all files in the folder like this (task attached):
Code:
PurgeFiles (296)
<List all files in your desired directory.>
A1: List Files [ Dir:Tasker/CallLogs Match: Include Hidden Files: Off Use Root: Off Sort Select: Alphabetic Variable:%filelist ]
<For loop for the length of items in your file list>
A2: For [ Variable:%counter Items:1:%filelist(#) ]
<Delete the file>
A3: Delete File [ File:%filelist(%counter) Shred Level: 0 Use Root: Off ]
<End for - delete loop>
A4: End For
Click to expand...
Click to collapse
This would be even better because if the same person doesn't call again in lets say x days then his file will remain in storage for x number of days.
And you won't believe that i was actually creating a code to delete all files at 00:00 everyday when i saw your post.

Hehe, cool!

Related

Any way to set a custom text message tone for a contact?

I searched the forum but could not find any information. I wanted to find out if there is any way to make a custom text message tone for a contact, similar to making a custom ringtone. Any suggestions? Thanks.
http://ringomo.com/
or try phonealarm
Thanks for the replies. Are there any "simple" apps that solely change the text tone for a contact rather than "complicated" apps like those.
ringo is pretty simple to use, you just pick a sound and then pick a contact, what part are you having trouble with?
I don't believe there is a way to integrate this into the current contacts list if that is what you are looking for.
vscout said:
Thanks for the replies. Are there any "simple" apps that solely change the text tone for a contact rather than "complicated" apps like those.
Click to expand...
Click to collapse
I posted this a few years ago over at HoFo...
Originally Posted by djayrage
Okay I figured out how to create a custom notification/ringer.
1: go to http://public.research.att.com/~ttsweb/tts/demo.php
And type in what you'd like for the notification or ring to say and then
download it after picking a voice. (keep in mind sometimes you have to purposely
misspell certain word to get them to be pronounced correctly. For example for DJ
I had to spell it as d j).
2: rename that file you downloaded into something you'd like.
3: move that .wav file to your devices /windows directory.
4: go to start - settings - sounds & notifications - notifications (select the
event you'd like to change the ring for and select the respectable audio file).
I personally use Mortring
It's freeware & can be found here.
http://www.freewarepocketpc.net/ppc-download-mortring-v0-991.html
About as "simple" as you can get. Works great & takes up next to nothing memory/ram.

Incorrect SMS Timestamps, HELP!

It's so annoying that I get messages from the year 2010, and when I go to the inbox, all the newest messages get pushed down the bottom while the 2010 message stays at the top.
Its annoying when I go to the message sometimes it goes back 1 year, 2008 and then I have to go through the entire message and repeatedly click "Older" 100000x times to finally read the message.. Any fix for this?
Your Xperia transcendences time and boundaries - NOT.
Check your system clock.
Clock and everything is correct..
Lol try flashing another ROM?
Try this one
Incorrect SMS Time - As provided by Touch-Guy..
Create DWORD key TrustTimeZoneField and set the value to 0 under
HKLM\Software\OEM\PhoneSetting
Click to expand...
Click to collapse
I'd like to get messages from 2010...
harveydent said:
I'd like to get messages from 2010...
Click to expand...
Click to collapse
only if they include stock prices and the scores of big sport events...
Incorrect SMS Time - As provided by Touch-Guy..
Create DWORD key TrustTimeZoneField and set the value to 0 under
HKLM\Software\OEM\PhoneSetting
what do u mean by create dword key?
Use a program that allows you to edit registry, browse to the phone setting folder, and create a DWORD?
Can u recommend me a prgoram? SmartReg for me is expired..
You can use Total Commander.
It's free
I have total commander, but I don't know how to create a dword.. and there are many buttons that have no labels on them so I have no idea which one to use..
I did go to the phonesetting directory, but no idea how to create the dword or which button.. need your help!
I somehow opened what looks like create new unnamed text or sth, and after it akss to save to device or storage, is this the right one?
Still need my question answered
Im still stuck with how to create the Dword.. which button do i use to create it?

Pulling Weather Forecast from XML

I'm a LONG time Tasker user, so I know my way around. But one thing I've never played with is pulling data from something like an XML.
I'd like to have my phone speak the day's weather forecast once I dismiss my alarm in the morning.
I have an FTP link to a the daily XML: ftp://ftp.bom.gov.au/anon/gen/fwo/IDN11027.xml
I need to pull the description for todays forecast, and the max and min values. I've highlighted where these are in the attached image, because the XML has forecast data for more several different locations.
I know you can split XML files to narrow down to the values but this is a rather complex XML, so I'm wondering if anyone is able to help me grab those values?
Each element starts with a unique code, "area aac....", so it should be possible. But because there are multiple instances of the same variable names, I'm not 100% sure on how to best achieve this.
I'm ok with the speech etc, it's just getting those values into Tasker variables that I'm asking for help with.
Any help is much appreciated
Managed to figure it out.
Using the split variable option is more simple than I though. Got it working great :good:
Files?
Hi!
can you post your project here?
It looks interesting to me... i would like to use it...
Thank you in advance.

Looking for a task to input text for sms.

Hi all,
So at work we have a walkie talkie radio system that people use. Sometimes people have it turned down or off when someone is calling them.
I usually send them a text telling them they are being called on the radio.
So can a task be made with a widget that when I select it, then it will first it give me a dropdown list of people on my contact list. After I choose a person have another drop down list. When I select those two people, tasker would send a text to the contact from my first dropdown box saying "(second name) is trying to call you on the radio!"
I hope I made myself clear.
Thanks in advance.
Look into AutoContacts plugin for Tasker. It will help you. In addition, Tasker has a "Send SMS" action and supports variables.
I don't think you'll find anyone who will just have this sort of thing already made and ready to go for you. You'll likely need to create this from scratch and push through the bugs as you test it. Think it through on pen and paper if you are having difficulties.
People are here on forums to help out with specific functions of Tasker... Most people don't fill whole profile/task requests here.
Thank you for the reply! I'll look into AutoContacts and give it a shot.
Stupifier said:
Look into AutoContacts plugin for Tasker. It will help you. In addition, Tasker has a "Send SMS" action and supports variables.
I don't think you'll find anyone who will just have this sort of thing already made and ready to go for you. You'll likely need to create this from scratch and push through the bugs as you test it. Think it through on pen and paper if you are having difficulties.
People are here on forums to help out with specific functions of Tasker... Most people don't fill whole profile/task requests here.
Click to expand...
Click to collapse
As an added request, I'll narrow it down. Does tasker allow for input to be selected from a list?
Crodley said:
As an added request, I'll narrow it down. Does tasker allow for input to be selected from a list?
Click to expand...
Click to collapse
Perhaps a scene would be best used for this if it is a small set of static individuals to choose from. Snackbar plugin or Material Design Plugin can be used in the place of scenes many times.

task when appointment in calendar starts/ends - how to find / with pattern matching

Hi,
I wanted to have a notification that always shows me the task that has me marked as busy in my calendars.
so I need a task that refreshs that notification whenever something changes. To achieve that I made 2 profiles:
-one profile is used to trigger the update task whenever the next appointment ends
-the other triggers whenever a new appointment starts
the update task not only creates the string for the notification but also refreshs the appoinment that ends next and also a string with all known appoinments. The second profile is triggered with a pattern match that always excludes all known appointments.
This way the second profile turns off itsself whenever a new appointment starts.
This way the whole thing works even if there are appointments that:
*start at the same time but do not end at the same time
*start at different times and end at different times
(if you don't have that: good for you ... no need to discuss it - I explained in the link below why this is not avoidable)
Now I still have one problem:
I do have appointments in my calendar that have slashes "/" (and many people might have when being invited by others). The list with the known appointments that is used as trigger for the second profile looks like this: "!appoinment1/appointment2" (the slash means "or"). If one of the titles contains a "/" that will keep the second profile on all the time and it will not trigger new appointments ...
unfortunately it seems like tasker cannot us other characters in that place (like regex) and it seems like I cannot even escpe the / slashes ("\/")
Any solution to that would be appreciated. And - maybe the code is usefull to others (there is a variable in the adjust_notif task in the very beginning that can be filled with the calendars that shall be shown in the notification - format "*cal1*/*cal2*/*cal3*" and so on)
Also for testing purposes I mad a variable %now to be able to change when the task is checking the calendar (of course this won't help when testing the profiles ...)
I started the discussion here but I think google groups is too unflexible (no file upload) and also ... too few people there ... and - I love XDA ...
best regards
Daniel
hmmm - testing if replacing the / with a + or * will help - would make the whole thing slightly unreliable but I actually don't think that would cause a problem ...
seems to work my perfectionism would prefer a better solution
However: how come the profile does not automatically update its status when I am in tasker? still shows green and only when I click it and go back it changes ...
good that I asked ... motivated me so that the thing is improved now. Still no real solution for finding / but a newer version with some bugs removed (callist did not really work with the old version)
I also made an additional profile with which it is possible to use "restore settings" so that now only one task "silent" is necessary to adjust to your personal needs.
Hi
I wonder where the palace is to discuss tasker projects ...
Here .... obviously not
Regards
daniu said:
Hi
I wonder where the palace is to discuss tasker projects ...
Here .... obviously not
Regards
Click to expand...
Click to collapse
interesting idea...
Have you tried putting all known appointments into a variable (appending, separated with a new line)? Then you can call on this variable to see if the current appointment has a match (with *%CurrentAppointVar*).
That way, there should be no slash in the match function.
alienyd said:
interesting idea...
Have you tried putting all known appointments into a variable (appending, separated with a new line)? Then you can call on this variable to see if the current appointment has a match (with *%CurrentAppointVar*).
That way, there should be no slash in the match function.
Click to expand...
Click to collapse
Hi
I don't get how that would remove the / from the text besides that I do check against a variable already if I understood your point correctly ...
Regards
daniu said:
Hi
I don't get how that would remove the / from the text besides that I do check against a variable already if I understood your point correctly ...
Regards
Click to expand...
Click to collapse
if I understood correctly, you have something like this:
current events: meeting/task1, meeting2, meeting3
new event: meeting4
if %new != meeting/task1/meeting2/meeting3
do something
which returns wrong results.
So I would try:
set %curr to
meeting/task1
meeting2
meeting3
(append, with new line after each event)
and then
if %new !match %curr
do.....
probably the appending part could be done with a FOR loop.
Hope this helps.
alienyd said:
if I understood correctly, you have something like this:
current events: meeting/task1, meeting2, meeting3
new event: meeting4
if %new != meeting/task1/meeting2/meeting3
do something
which returns wrong results.
So I would try:
set %curr to
meeting/task1
meeting2
meeting3
(append, with new line after each event)
and then
if %new !match %curr
do.....
probably the appending part could be done with a FOR loop.
Hope this helps.
Click to expand...
Click to collapse
Hmmm ... well - the problem is that I check against that string in a profile not in a task ... I ckeck if a new task starts that does not have a name within that string (of currently running appointments). In your example:
!meeting/task1/meeting2/meeting3
My way now is to change the check variable to:
!meeting*task1/meeting2/meeting3
which does jot work that bad after all ...
I am just generally a bit disappointed by this forum because I would love to have a place were there are enough ppl so that someone would be interested enough to actually install the project which even you obviously did not do.
Regards
daniu said:
Hmmm ... well - the problem is that I check against that string in a profile not in a task ... I ckeck if a new task starts that does not have a name within that string (of currently running appointments). In your example:
!meeting/task1/meeting2/meeting3
My way now is to change the check variable to:
!meeting*task1/meeting2/meeting3
which does jot work that bad after all ...
I am just generally a bit disappointed by this forum because I would love to have a place were there are enough ppl so that someone would be interested enough to actually install the project which even you obviously did not do.
Regards
Click to expand...
Click to collapse
sorry to say this, but obviously your project didn't raise enough interest, at least not for me. I guess people try to help where and how they can, without obligations. You should not expect much, especially when the project is complex...
just my 2 cents

Categories

Resources