
In the first part of this guide I covered the basics of Tasker, and mentioned that I would go more into variables and scenes later on. Both are features that require a bit more explanation than the other aspects in general, so I’m going to dedicate an article to each of these topics. First out, variables.
What is a variable?
Variables are part of many programming languages, and Tasker is, in many ways, a programming language. Mathematics also use variables, and in many ways they work the same too.
A variable is essentially a virtual text file. Imagine a text file called variable.txt that contains the text “Hello World.” Instead of it being a physical file you can move around however, it exists within Tasker; and instead of being called variable.txt, it’s called %variable. The percentage symbol is always present at the beginning of a variable name, and it’s the way that Tasker knows that something is a variable – just like the file extension .txt lets computers know that it’s a text file. The name that follows the percentage symbol is in a way the file name. Just like a text file, a variable can contain text, but only text. This text can be a single symbol, number, a URL, a paragraph from an article – any text, in other words.
When a variable is used anywhere in Tasker, Tasker will replace the variable with whatever the value (content) of the variable is when it executes whatever the variable is used in. Let’s say you have a variable %hello that contains “Hello World.” You then tell Tasker to create a notification with the text %hello. When Tasker then goes to create the notification, it will check the value of the variable, and use that instead of the variable name. As such, the final notification created by Tasker will not read “%hello.” Instead, it will read “Hello World.”
Why use variables?
The purpose of variables is to have a way to store information in a dynamic way. This enables you to not only transfer information between different parts of Tasker, but also to control Tasker settings and text remotely, without having to go into each context/task and manually change it.
To fully understand the purpose of using variables, you first need to know about the different ways that you can change the value (contents) of a variable. Some examples include:
- Set the value of a variable using an action. This value can then be used as a context for a completely different profile, or used as part of other actions
- Turn the contents of a real text file into the value of a variable
- Do math using variables. For instance, you can add +1 to a variable every time an action runs. The variable value would then increase in numerical value the more times the action is run, acting as a counter
- Many system settings and events exist in variable form in Tasker. The value of the variable %TIME is always the current time, %DATE is always the date, %BATT is always the battery level and so on. Full list of these so-called built-in variables are here, and knowing how to use these is one of the more important lessons of Tasker
In short, there are many ways to change the value of a variable. The whole idea is to create a library of information that different parts of Tasker can access, instead of having information stored as static text that’s only usable where it’s written. In fact, variables share a lot of advantages with the internet:
- Information can be shared easily between connected participants
- Information collaboration is possible by having multiple participants work on the same information
- Information can be updated in once place and still reach multiple participants without each of them having to be updated directly
With the internet, participants are internet users. With Tasker and variables, the participants are different actions, contexts, and so on within Tasker.
Variable name capitalization
The capitalization of variable names actually changes – and indicates – what type of variable it is. There are three types: local, global, and built-in. To create variables of a certain type (only global and local variables can be user created), simply use the corresponding capitalization format. Furthermore, global variables are listed in Tasker’s Variables tab, however neither local nor built-in variables are.
- Local variables are all lowercase and are only available to the task/profile that creates them. If you have a task “Home” that creates a variable %home, then that variable will not be available to other tasks. Another task “Away” would hence not be able to use that variable.
- Global variables are listed in the Variables tab and will be visible and usable by all parts of Tasker. These variables have to start with a capital letter. If your “Home” task creates a variable %Home, your “Away” task will be able to see it, change it, and use it.
- Built-in variables are always all uppercase. These are the variables I talked about above which are built into Tasker and that take on the values of system information. %TIME, %DATE, and %BATT are the examples I used above. These can be read by any part of Tasker, but do not show in the variables tab. Furthermore, they cannot be changed by the user, as they by definition display a piece of system (generated) information. The only way to change %BATT is to change the actual battery level by charging or discharging the battery.
Exceptions
No rules are without exceptions. There are some variables that take the form of local variables, but are actually built-in variables. An example is %new_val, which you’ll run into in scene creation. For the time being though, you can ignore these for the sake of avoiding unnecessary confusion.
Variables for information sharing and dynamic text
Variables can be used to share information between parts of Tasker, and even between plugins and Tasker. To use the internet simile from above, variables allow one part of Tasker to send information to another part, just like an internet user would email another.
The concept of dynamic text is like document collaboration in Google Documents or other online document editors. Instead of text being a static creation, parts of it can be changed out by different independent sources.
Example 1: My morning message
I have an elaborate sleep mode setup that I use every night. When I wake up in the morning, I use a Tasker action called Say (found in the Misc category), which is a text to speech function. This action has a text field into which I type the text I want it to say, and then the phone reads that message out loud. Currently, this text field reads:
Good morning. You slept for %Smduration hours. %Lazy. Weather forecast for today is %Norweather. %Todomorningnot
As you can see, this message contains 4 variables (it used to contain more). Before the Say action runs, dozens of other actions run, collect and process data, and store the final results in these four variables.
- %Smduration is the duration, in hours, that the sleep mode was active for. If it was activated at 23:00 (11 PM) and deactivated at 7:00 (7 AM), then the value of %Smduration would be 8.
- %Lazy’s value depends on the value of %Smduration. If %Smduration is at least 9, %Lazy’s value is “You lazy bastard”. If %Smduration is less than 9, it’s simply nothing.
- %Norweather is the result of a task I made to collect Norwegian weather data. Its value is a very short description of the weather forecast for that day, like “sunny” or “heavy rain.”
- %Todomorningnot is part of my Tasker-based todo list system. If I have todo list items marked “morning,” its value is “You have items due in your todo list.” If I don’t have any such items, its value is simply nothing.
By using these four variables, the message the phone speaks in the morning varies depending on these – and here comes the reason for the name “variable” – variables.
If I get up after 8.5 hours on a rainy day where I have nothing to do, the phone will speak the following message:
Good morning. You slept for 8.5 hours. Weather forecast for today is rain.
If I get up after 10.2 hours on a sunny day where I have items in my todo list, the phone will speak the following message:
Good morning. You slept for 10.2 hours. You lazy bastard. Weather forecast for today is sunny. You have items due in your todo list
Using variables in this way here gives me two very important abilities:
- My morning message is dynamic. Even though I never go in and manually change the Say action’s Text field, the message still changes.
- I can transfer information from one part of Tasker to another. The four variables in the message are each the result of work done by other tasks and actions, and using variables allows me to transfer this information to where I need it.
Example 2: AutoRemote
AutoRemote is a Tasker plug-in that I’m particularly fond of. It allows different devices to talk with one another by sending each other messages that are not visible to the user. It allows Tasker on one device to talk to Tasker on another device, without using a communication method that is meant for something else – like SMS or email.
Incoming messages through AutoRemote can be used in two ways: as triggers, or as information sources. If it’s used as a trigger, you can for instance set up a Tasker profile that activates if a message that says “hello” is received through AutoRemote. This could for instance be used as a “find my tablet” feature, where sending a message with “hello” from your phone to your tablet triggers a task that makes the tablet beep.
If the message is used as an information source, the actual content of the message can be transferred to a Tasker variable. Let’s say that you want your tablet to be able to tell your phone the status of the battery. Your tablet could then send the following message to your phone:
Tablet battery level %BATT percent
Where %BATT is a built-in variable. When the tablet sends this message, it will replace %BATT with its own battery level. As such, the message that arrives on the phone will have the tablet’s battery level.
The phone would then be configured to look for a message that contains “Tablet battery level.” AutoRemote has an option for whether it has to be an exact match, which in this case we wouldn’t want. This message filter would act as the context for the profile, meaning that the profile would trigger when a message containing “Tablet battery level” was received.

This is similar to the “find my tablet” example above, but we want to go one step further here – actually using the content of the message as well, not just use the message itself as a trigger.
To do this, you would configure AutoRemote to turn the message into a variable – let’s say %tabletbattery. That variable could then be used in a notification, Say action, or similar. Simply creating a Say action with %tabletbattery as the text, and using it in the profile that is triggered by the incoming message, would then have your phone read the tablet’s battery status out loud when it receives a message from the tablet.
Since %tabletbattery is a local variable it would only be available within that profile, but you could easily use the Set Variable action in the Variable category to create a global variable. This is done by setting the Set Variable action to create a variable with global variable capitalization, like %Tabletbattery, and setting its value (in the Set Variable configuration screen) to %tabletbattery. This would then create a global copy of the local variable.
In this AutoRemote example, the value of a built-in variable on a tablet is sent to another device using a plug-in, where it’s turned into a variable which that device can use. This is just another example of information transfer using variables, but a more advanced one since it transfers information between devices.
Example 3: Minimalistic Text and Make Your Clock Widget
Minimalistic Text and Make Your Clock Widget are two independent Android widget creation apps that both have the ability to receive information from Tasker. They both interact with Tasker very similarly, using an action that transfers information from Tasker (either static text or the value of a variable) into the apps’ own variables.
I use both of these apps, and I use them both with Tasker. I use Minimalistic Text for my shopping list, by having a widget on my lock screen that Tasker can write information to. The widget only shows something if I’m outside and have items in my shopping list; otherwise it’s blank. The shopping list is handled by my own Tasker-based system.
The configuration screen image to the right shows how the action that bridges Tasker and Minimalistic Text is configured. It transfers the value of the Tasker variable %Todoshopping into the Minimalistic Text variable TODO, the latter of which is a variable in a completely different app and as such doesn’t use the % symbol to indicate a variable. Once this task is run, any place where the variable TODO is used in Minimalistic Text ( will then show the value of %Todoshopping. Each time %Todoshopping is changed in Tasker, the bridge action has to be run in order to transfer that information to Minimalistic Text.
Variables as settings
Variables have another use that is perhaps less apparent, but still very important to be aware of: they can be used as settings. This is done by assigning values to variables which are then used as references later. If you have a profile for when you’re home, you can use the Set Variable action to set a variable %Home to “on” when it activates (enter task), and set it to “off” when is deactivates. Any other part of Tasker will then be able to check what value %Home has, and in turn know if you’re home.
If you think about it, this is how settings work outside Tasker as well. If you go into system settings and turn off WiFi, you’re essentially setting a WiFi variable to “off” – it’s just a more visual way of doing it. If you’re connected to a WiFi network called McDonald’s, that’s like having a variable for WiFi network with a value “McDonald’s.”
Referencing variables: contexts
When I say that other parts of Tasker can check the value of variables and act accordingly, there are many ways it can do this. For contexts, the value of a variable is its very own context. It’s located in the State section, Variable category, Variable Value context.
The screen you get when selecting this context asks for a Name, Op, and Value. Name is the variable name, like %Home. The variable name you put here is simply the name of the variable which contains the information you want the profile to be aware of and react to.
Op is a bit more complicated. It means Operator, and refers to the method Tasker uses to check the value of variables, using a simplified version of regular expressions. You can set it to things like Matches, Doesn’t Match, Maths: Less Than, and so on. In short, the operator refers to the relationship between the third field, Value, and the actual value of the variable.
As an example, let’s say that you want a profile that is active when %Home is set to “on,” and deactivated when %Home is set to “off.” You would then use %Home as the Name, Matches as the Op, and “on” (without the quotes) as the Value. The resulting context can then be read like this:
Activate the profile if the value of the variable %Home matches “on”
To take another example, think back to the morning message example above. The variable %Lazy there has a different value depending on whether or not %Smduration is less than or more than 9. If I want to create a profile that reacts the same way, the Name would be %Smduration, Op would be Maths: Greater Than, and value would be 9. The resulting context can then be read like this:
Activate the profile if the value of %Smduration is at least 9
To finish off with a real world example, I use this system for my location profiles. I have three profiles that are mutually exclusive yet use different contexts. My Home profile is active when I’m connected to my home WiFi, my School profile is active when there’s a calendar entry in my School calendar, and my outside profile is active when the other two aren’t.
To be able to make sure that all profiles are indeed mutually exclusive, I use my own variables as settings. Both the School and the Home profiles have Variable Set actions on both the enter and exit tasks. When the Home profile is active, it sets the variable Home to 1, and when it deactivates, it sets it to 0 (exit task). The School profile does the same for %School.
The Outside profile then has two Variable Value contexts: %School Matches 0, and %Home Matches 0. In other words, it’s only active if both those variables are set to 0 – which in turn only happens when the other two profiles are inactive. The School profile also has two Variable Value contexts, %Home Matches 0 and %Schooloverride Matches 0. The former makes sure the school profile isn’t active when I’m at home (which could happen if we finish early,) whereas the latter variable is set by a button in a scene I have. I’ll cover scenes in the next article, but to make a long story short, I press a button that says “School override” and the school profile deactivates. This is for situations when I finish early but don’t go straight home (50 meters away), allowing me to manually trigger the Outside profile (by deactivating the school profile) for those rare occasions.
Referencing variables: actions
It’s not just contexts that can be controlled by variables – actions can be, too. One of the images in my first article pointed out the If checkbox on an action configuration screen. This checkbox is present for most actions, and allows you to control the action based on If conditions. An If condition is quite simply a condition that has to be fulfilled for the action to run.
For all intents and purposes, If conditions and Variable Value contexts work the same way. You have a variable name, an operator, and a value that has to be compared to the value of the variable. In the previous section, I explained how the Variable Value context works by using the configuration %Smduration Greater Than 9 as an example. That’s from my sleep mode profile, but it’s actually not used as a context in that profile: it’s used to limit an action using an If condition. The image to the right shows how this is configured.
As you can see, the If checkbox is checked; %Smduration is inputted into the first field; 9 into the second; and the operator is >, which is the symbol for Greater Than. With the action configured this way, the action will only run if the value of %Smduration is greater than 9. If it isn’t, the task simply skips that action.
I can use the same system to limit single actions based on the %Home variable created by my Home profile. If I want an action to run only when I’m home, all I have to do is check the If box, type %Home into the first box, select = (Matches) as the operator, and type 1 into the second box. That way it will only run when the value of %Home is 1, which only happens when I’m actually at home.
Please note that the choice to set %Home/%School to 1 or 0 instead of on or off is my own personal choice. You decide what the various states of a setting should be, and if you were to create your own Home profile with a %Home variable, there’s absolutely nothing stopping you from using a value of “crabcakes” as “on” and “hurricane” as “off.” It would simply mean that you would need to set the context/If condition to %Home Matches “crabcakes”.
It’s also possible to group multiple actions under the same If condition. To do that you use the If action found under Task, configure it like you would an integrated If condition, and then place it before the first action you want in the grouping. Any actions following that If action will then be nested under it, and follow its condition. You close the group by inserting an End If action. This is simply an easier method for applying the same If condition to multiple actions
Finally, there’s an action in the same category called Else. This is an optional action you can use between an If and an End If condition to create a new group of actions (nested under the Else action) which will run if the If condition is not met, but only if it’s not met. The screenshot to the right demonstrates this with one of my profiles, where I’ve inserted an Else action for the sake of demonstration.
The way to read this setup is as follows:
If the if condition is fulfilled, run action 3 (Notify Sound) and 4 (Minimalistic Text)
If not (Else), run action 6 (Stop)
The Else action is optional, and it really only saves you from adding a second If group that is the exact opposite of the first one.
I have previously written an article on controlling profiles using variables, which you can find here. Much of it is the same as what you’ve read here, but it was written for existing Tasker users, not beginners.
Special characters
When doing pattern matching using this method, it’s important to be aware of the three special characters *, / and +.
* is a wildcard, meaning that you can use it to match only part of a piece of text. If you input Android into the value field and use Matches as the operator, it will only match the exact use of Android. *Android* on the other hand will match any use of the word Android, like I like Android very much. *Android would match I like Android, but not I like Android very much, because the wildcard is only in front of the word, not behind it. In some cases it’s better to use *ndroid* instead of *Android* because the former will catch both Android and android.
Update: Sean points out in the comments that you can use all lower case letters in pattern matching and it will work with everything. For instance, *ndroid* here is not necessary because *android* would match with both Android and android. It does however not work the other way around, so *Android* would not match both. I wasn’t aware of this, and it saves you some hassle when dealing with case sensitivity.
/ acts as OR, meaning that it lets you insert multiple values in a single field. Inputting 1/2/3 in the value field and using Matches as the operator would match variable values of both 1, 2, and 3. This is very useful since it lets you create contexts and If conditions that react to several different variable values.
+ means “at least one letter.” You can see the use of this in the If/Else/End If screenshot above, in the very first action, where the If action is configured as %Todoshopping Matches ++. Tasker reads this condition as “If %Todoshopping contains at least two letters, no matter which letters they are.”
Empty variables
Empty variables will not be replaced by blank space; instead, they will retain their full variable name if referred to. If you create a notification with %Variable as the text and that variable doesn’t contain anything, then the notification will literally say %Variable. To make it display blank space instead, create a Variable Set action for that variable and set it to a space.
Use an If condition with the variable in question as the variable, Matches as the operator, and *variable-name-without-%-symbol* as the value (see the screenshot below to see what I mean by this).
Example for the variable %Home:

This writes a space as the value of the variable if it’s empty, which it detects by seeing if the variable value is the variable name. Note that you should insert the space in the text field last, and immediately save without selecting anything else. Otherwise you will likely get an error message saying that the field can’t be empty.
Processing data using variables
So far I’ve mostly talked about simple ways of using variables to transfer information and control actions and contexts, but that’s only half the story. For those who have read my older articles about Tasker, you’ve probably seen some articles which processed data internally in Tasker. Examples include a weather forecast announcer and calendar event announcer. What these have in common is that they process information after it has been imported into Tasker, essentially taking a single variable full of information and chopping it up into tiny pieces that can be used as settings or as dynamic text.
To do this, you use many of the tools available in the Variable category in the action list. Variable Split is one of the most powerful, but you’ll also find Variable Section, Variable Search & Replace, and others. Knowing how to use these gives you the ability to get Tasker to do practically anything, since more or less any text-based information source online or offline can then be used with Tasker.
Unfortunately, this is a massive topic to cover, and I’m already coming up on 4000 words from explaining the “simple” side of variables alone. As such, I want to dedicate an entire article to this topic later on in the series, after some of the more basic things are out of the way. I did however want to mention it briefly in this article as to not make people think I either forgot or that they’ve missed something.
Nelly is built on pattern matching variables
To finish off this part of the guide, I can mention that my DIY Tasker-based voice assistant, Nelly, is built (more or less) entirely on the concept of variables and pattern matching. It can be a good idea to read through that (old) article after reading this part of the guide to see how it’s implemented in practice and at such a large scale.




















Amazing!
Such an in-depth article. Very good information here, congrats!
Very good article, I hope to see more of ‘em. Still a little confused on variables though. I’m sure I’ll learn more about them with time…
Regardless, keep it up.
These past two articles are real gems on this site. I really enjoy reading the staffs’ original works because they are so useful and informative.
As more and more mutually exclusive tasks are added do you still recommend using Global variables that change from 0 to 1 or are there alternative methods that I do not know of? I have “Home” “Work” “Outside” “Univ” “Rents” and I see the list growing.
Also is I know there is ways to change network mode but is there also a way to change roaming? I actually get better battery life when I force roam at my parents due to poor coverage there.
Thanks for the compliments!
There are other (similar) methods you can use as the number of variables increase. A variable doesn’t have to have only two states (on/off), it can have multiple. As such, instead of having %Home = 0/1, %Outside = 0/1 etc, you can have %Location = 0/1/2/3/etc or %Location = School/Outside/Home/etc. That way you have a single variable that has multiple states you can work off of. You’d set up the Set Variable system pretty much the same, so that your Work profile sets %Location to Work as the enter task and maybe set it to %Outside as the exit task (if you don’t have any direct contexts for outside).
Remember that it’s also possible to use 7, the OR symbol, when matching patterns. For instance, if you have a separate profile that should be active at work and home, but not outside and school, you could use a single Variable State context for %Location Matches Work/Home. That way it would be active both when you’re home and when you’re at work.
I’m not aware of Tasker’s abilities with regards to roaming settings, as it’s something I never use. If there isn’t anything that mentions it directly in the Tasker action list, you might want to download Secure Settings (a Tasker plugin) and see if it can do it. It requires root, and uses that permission to give you access to more settings than normal Tasker.
“Remember that it’s also possible to use 7, the OR symbol, when matching patterns. For instance, if you have a separate profile that should be active at work and home, but not outside and school, you could use a single Variable State context for %Location Matches Work/Home.”
“7″? I hope you meant “/” otherwise I’m really confused. I’m trying to get into variables myself and after reading your articles on the subject and downloading/examining examples from the Tasker’s wiki page, I believe I’m beginning to grasp the concept.
Using your %Home example above: “If you have a profile for when you’re home, you can use the Set Variable action to set a variable %Home to “on” when it activates (enter task), and set it to “off” when is deactivates. Any other part of Tasker will then be able to check what value %Home has, and in turn know if you’re home.”
For %Home to be used as a context later it had to have been set first though, right? But where is the home profile defined as the variable %Home while creating the profile? This is where my difficulties lie.
Here’s a simple home profile:
Context(s): Time – 18:00 – 23:30
Day – M,T,W,Th,F
State – WiFi connected
Task(s): WiFi on
Bluetooth off
Ringer Volume 5
Notification Volume 5
Questions:
Where would this profile be defined as %Home? (I’m assuming in the Task section, but as the first task, last task, doesn’t matter?)
and at what value is it set to “1″, “on”, doesn’t matter? (But I assume it matters when you use it as a context to match values(?))
Thanks in advance for your help.
Yes, it’s /, like it says in the main article.
You set the value of a variable using an action. This action can then be used as a context, called Variable Value in the State context category, not as an action. You create a pattern matching rule for the context which makes it react to the value of %Home. This method allows a profile to be dependent on another profile, the latter of which is what manipulates the value of %Home. For me, %Home is set by my home profile, and several other profiles use it as a context.
Hi, such a genius work you did with tasker, learned a lot from it.
I am new to this application & just bought it
I was trying to do that if my cell is on a call (any incoming or out going) if anyone else call me then he receives message that I am on another call
I made one such profile but it shoots message to both nos, (i.e number I am talking to and number which called me in between)
I know about missed call action but I want to do it for in call situation
Take a look at Tasker’s built in variables to see if there’s something that contains the number of the person you actually want to reply to http://tasker.dinglisch.net/userguide/en/variables.html
A godsend …
Is it possible to have a printable version (PDF, etc…) of this tutorial (part 1, part 2, and forthcoming chapters) ?
Thanks in advance
You’re free to print the articles ofcourse, but there wont be an official pdf. Everything is formatted for the site, there are videos, and this is a website after all, not an ebook service
As a new user to tasker, these tutorials are wonderful. Thanks!
Deb
I once used Tasker to have my phone call someone and put them on speakerphone first thing in the morning to be waken up.
Under “Special Characters” you say to use *ndroid* because it will catch both Android & android. You can just write it all lower case and it will work. Capital letters will work when matched against lower case, but not the other way around. If you checked to see if *android* matched *Android* it would not pass the check. I believe it says this somewhere in the built-in userguide.
Nice tip, thanks!
Im confused and was wondering if you could help me with this:contexts, connected to home wifi between 16:00 and 16:30. task, wake on lan. The issue is, it keeps sending wake on lan commands. How can I make it so that the task only occurs once per day? I’m having the same issue with a morning mode I made (from this article). I also don’t know what to set %Smduration to for the morning talk?
A task is supposed to run only once per activation. If yours runs repeatedly, it indicates that the profile is triggering multiple times. Or that youre using a wol plugin that by default sends 5 pings, as I know there’s one of those. Same with the morning system – i dont know what you trigger it with but it should only run once unless theres a loop in the task or the profile activates several times.
%Smduration isnt explained in full detail here. It is however here: http://www.pocketables.com/2012/10/complete-list-of-my-current-tasker-creations.html
It’s the final resuling variable after you do some math with others
Hi mate, I’m enjoying working my way through your Tasker articles. Over the last couple of days I’ve had some spare time and I’ve now got my own working projects which are … (1) Quick settings (2) To-do list (3) Sleep mode (4) Voice assistant (5) K9 email notification. All of it is working, and I’m very happy with it.
After I finished working on the voice assistant today, I put the Todo Morning task in the tasks tab of the Todo list project, just like you’ve done in section 3, inserted the %Todomorningnot variable into a “Say Command” in the Screen-On task of my sleep mode, put an item in to the morning list, run the sleep mode, and she just reads the variable.
I guess it’s kinda hard to say what I’ve done wrong, but everything else works 100% , so I was wondering if you have a morning mode project that is triggering something that I’ve missed. My next step is to work on %Smduration hours, %Lazy, and %Ukweather, which obviously isn’t going to work if I can’t figure this out. I just can’t connect the dots on this last bit, so any help would be great
%Todomorningnot is created by running Todo Morning, at least if it’s identical to mine. This is mention in the sub-heading “The non-scene part of this list” in part 3 of the guide. In order for the %Todomorningnot to actually contain something, you need to run the Todo Morning task before you use %Todomorningnot in a text field, in order to populate it. If you check the Sleep Mode tab in this article: http://www.pocketables.com/2012/10/complete-list-of-my-current-tasker-creations.html
you’ll see that I run the Todo Morning task using Perform Task right before the Say action in my morning message.
Oh yeah, that’s so obvious now you say that. I will take a look at that page in a bit, and report back. Thanks mate
Np. Things like that happen easily when I only provide random details, not downloadable projects/profiles/tasks. But on the other hand, it teaches you how things work when you run into these issues
WOO HOO … 100% working
I kinda like the way you only provide random details, and we’ve got to flip about connecting the dots because i feel i’m learning, not copying.
You give enough random details, written in a logical way. I did have a couple questions but i should be able to pick it apart using that link you posted.
Thanks mate, my phone really is becoming a smarter phone now
Hello fellow Norwegian!
I have a sleep profile that sets the phone to silent mode BUT it allows certain contacts to call and it will turn off silent mode for 5 minutes. That got me thinking: I should allow anyone to call IF it’s important by sending me a SMS.
I posted the question here: http://forum.xda-developers.com/showpost.php?p=33984430&postcount=1332
Could you do a how-to on this case? What am I doing wrong?
Thanks!
Why are you turning off sleep mode for 10 minutes when you get a call?
Didn’t see your reply until now. Sorry.
I want it to turn silent mode off if I get an sms with “important”.
If someone calls when the phone is in silent mode tasker sends a sms that they can turn on my sound by sending the important text and then call again.
The problem is they get sent the first sms (that they can turn silent mode off by sending a sms) the second time they call (when silent mode is off already).
Yeah I know what you’re trying to do. My question is still why your phone ringing profile turns off sleep mode for 10 minutes when you get a call, as that’s what your post on xda says. is sleepmode is one, turn it off, wait 10 min, turn it on.
I was just trying to set variables so that they won’t get the “send me a sms with important!!! and call again to turn my ringer on” the second time they called (when silent mode is off already per their SMS).
I tried a lot of different methods, but they would always get that first SMS when they called for a second time.
My main profile says: If between 00:00-07:00 Mon-Fri -> sleepmode = 1, silent mode on.
I am trying to make my “send me a sms with important!!! and call again to turn my ringer on” profile to deactivate the main profile, then turn off my second profile “send me a sms with important!!! and call again to turn my ringer on” when they call while the 10 minute window is open.
How would you set it up?
I guess that works, but it also turns off whatever else %sleemode controls for 10 minutes. That might not be important for you, but for me (I have a sleep mode too) it would be catastrophic xD
Ideally you would have a system to check if someone had called within X minutes. That’s not very hard. For each call you need to save the caller’s number with %TIMES (time in seconds) for when he called, in a way that makes it easy to split it out again afterwards. Then, you start off the caller task with loading each of the entiries into an array. Run a For loop for each entry where you split out the pieces and do a TIMES comparison whenever the saved number matches the incoming number. If the difference is lower than a preset value, play a sound file manually to act as the ringtone. This will then run each time the phone rings while in sleep mode, spending a couple of seconds finding out if the caller just called, and if he did, play a sound file to alert you rather than overriding sleep or silent mode completely. Silent mode doesn’t affect the alarm sound channel so you can use that.
Obviously the SMS reply system would be placed after this in the task, and be dependent on it (disabled if a match is found).
To add an SMS disable system, you can make an incoming SMS write the same variable/file that you store the recent caller info in, just use a recognizable trigger that you can add an IF condition for at the beginning of the call task to override everything.
You’d should probably clear out that list for each sleep mode session.
There are tutorials for everything I’ve mentioned here in later parts of the guide. I realize it sounds complicated, but once set up, it should workwell
Thanks for the help. I will see what I can do
Could you please post how you made the sleep profile actually time the amount you slept
It’s described here: http://www.pocketables.com/2012/10/complete-list-of-my-current-tasker-creations.html
Hi Andreas how do I make my ‘back’ button outside of my s3 disabled and have it as a scene button?
No clue, sorry
Dam, is there a way to set 1 of my buttons to skip to next song like up/down volume when music is on and phone is off, I want the profile to let me use the turn off button to act as a skip button while display is off
The only two buttons that Tasker can read are camera and long press search. not all devices even have those
How do you control menu options on an app with Tasker? Say I want to have a scene button to set it as an option button while on the app but it’s not a new button its a button for the apps button
What are empty variables for?
I would like to learn how to make a dynamic global variable such as %Smduration
TASKER is the next Autohotkey for Android. THE BEST!!!
Hi there!
Nice to see, that the conversation here is still alive!
I’ve got a little problem and wasn’t able to find any answer anywhere out there. So this here is my last chance!
Q: I want to use a variable within a sentence for text output on screen. The variable, for instance called %distance contains a number (let’s say 10, in this example). And I want the output read as “10m” – without a space! But how do I append a constant right after the variable name? %distancem doesn’t work. I’ve tried different special characters like % or \ or \\ already, but nothing worked. I’m really corious meanwhile, if there is a solution for this (exept appending the constant text to the variable before output)
Greets, Edgar
Set a global variable with your appended text, e.g. et %Meters to m. Using %distance%Meters will then result in 10m
Hi Andreas!
Thanks for your tip. At least a workaround
Hi,
I’d like to have your suggestion on how to solve my problem.
I’m trying to set up a “Morning Biking” profile:
- Context:
+ Plugin the headphone
+ Time of plugin: between 5:30-5:45am
- Action:
+ Turn off wifi, turn off Sync, turn on 3G, turn on GPS, start Endomondo.
My problem lies with the time context. I want the profile to be activated only and only when the headphone is plugged in between 5:30-5:45am. If I set a Time context with that time frame, the profile will be deactivated at 5:46am, which I don’t want because I normally ride until 7:00am. Is there anyway to solve the issue?
Thank you.
Create a separate profile with the time context, and then make that profile’s task set a variable, e.g. %Bikingtime to 1. Make sure you create an exit task that sets it back to 0. Create a second profile, use the headphones context. Create your task, and put it inside an If group for %Bikingtime matching 1. That way, the profile will always be active as long as headphones are plugged in, but only actually change settings and open the app if it’s activated within that window. You could even put in actions that it would do when %Bikingtime isn’t 1, i.e. have a “what to do when headphones are inserted” system that changes based on time.
Thank you very much.
You explain what variables do vary well, but I still have no idea who to set up variable our even create my own. Can you please help?
Hello! I have just purchased tasker today after reading a lot about it and I KIND of know what I’m doing. It’s the variables that confuse me though. I have a profile that when the phone is connected to the bluetooth in my truck, and someone sends me a text…they get an automatic respose from me saying that I’m driving. It works fine, but I would like to exclude a certain phone number/person from getting that text. Is this doable?
Perfectly doable, and exactly the kind of thing this guide is designed to teach you how to do
Hi Andreas,
Thank you for your post.
I’d like to use Tasker to toggle the mobile network carrier automatically when I cross the border.
Actually I live in France near the Belgium border (so my “contract” carrier is French – SFR) and I work in Brussels, Belgium. So every my Galaxy SIII switches automatically to Belgian Carrier Proximus, but when I go back home every night, I stay connected to Proximus whereas I would prefer to toggle to SFR automatically.
Would you be kind enough to highlight me on the way I could make this happening with Tasker?
Tx
Unfortunately I no longer good out ready made recipes for specific profiles, as this is a guide meant to teach how to use tasker in general, not act as a “recipe dispenser”.
Thank you Andreas.
And do you know a relevant website that could help me?
Cheers.
You can try the Tasker google group or reddit subreddit. I’ve had to focus my attention outside Tasker as the latest versions of the app aren’t compatible with the Android version I use, so I don’t even want to try to instruct anyone to do anything when there’s an increasing chance for each relese that there are version differences I can’t account for
Hi there,
I have HTC sensation, its unrooted phone. I want to create a profile, where receiving particular text from particular no. send back mobile location
This text can be SMS or whats app any
Can this same profile being export as application to use same in other non tasker mobile
Pls share if any tutorial available, I checked other sites but it has option for rooted phone only
Thanks in advance
It’s quite possible, unfortunately I cannot offer you a step by step tutorial
Thanks for the tutorial. As for variables, the documentation (http://tasker.dinglisch.net/userguide/en/variables.html) says it will be global variable when any of the characters in the variable name is a capital letter. The name doesn’t necessarily have to start with a capital letter.
Wow, your information is great. I have so many ideas already. I want to stay up all night playing with tasker now and call in sick to work tomorrow. I can hardly wait to read the rest of the articles. THANK YOU!
Aw, this was a very nice post. Spending some time and actual effort to
produce a really good article… but what can I say… I hesitate a whole lot and never seem to get nearly anything done.
Good post. I learn something new and challenging on blogs I stumbleupon everyday.
It’s always helpful to read articles from other writers and practice something from their websites.