How to use Tasker

May 1, 2013
15
273

Scenes

Scene creation is actually an advanced topic that deserves its own separate tutorial, but I’ll briefly talk about it here for the sake of completeness.

how-to-use-tasker-ss-002

A scene is a custom user interface that you build from scratch. It can use elements that you usually find on UIs, including such elements as buttons, doodles, images, maps, menus, shapes (e.g., ovals, rectangles), sliders, text boxes, text input fields, and web viewer boxes. Each element is customizable.

For demonstration purposes, I’ll show you how to create a simple popup box that displays an SMS message when it arrives.

  1. Open the Scenes tab in Tasker.
  2. Add/Create a new scene. Provide a name for it. In this example, I’ll use “PopSMS” as scene name.
  3. You’ll see the Scene Edit screen in Preview Mode, with a dotted box in the middle. The dotted box is your scene display area. You can resize this, if you want. You can also change the background color of the display area, if you want. For now, let’s just stick to the default.
  4. To be able to add UI elements to the display area, you need to switch to Editing Mode by tapping the magnifier with an X at the lower-right corner. Then, hold down on the display area to bring up the UI elements menu.
  5. Tap on Text to add a text box to the display area. Keep its default name. In this text box we’ll display the text body. So, as value for Text, we specify a variable, specifically the variable for the body of an SMS message. Tap the tags icon at the right of the Text label, scroll down, and tap “Text Body.” You should find %SMSRB as the value for Text.
  6. Tap the virtual Back button to return to the Scene Edit screen.
  7. We’d like to show the name of the sender, too. So, let’s add another text box to display the sender’s name. Just follow the same procedure for adding a text box to display the SMS text body, but for Text value, choose “Text From Name.” You should see the variable %SMSRN as the value for Text.
  8. Again, tap the virtual Back button to return to the Scene Edit screen.
  9. Finally, we’d like to add a button to close the popup box after the message is read:
    1. Select “Button” from the list of UI elements. Just keep the button’s default name.
    2. For Label, you can use “OK,” “Done,” or “Close.”
    3. Then, specify the action to perform when this button is tapped. For that, switch to the Tap tab. Then, tap Add > Scene > Destroy Scene. This action, of course, does what it says — it will destroy the scene that you specify in the Name field. Choose “PopSMS” as the scene to destroy. It should appear in the Name field.
  10. Tap the virtual Back button until you’re back at the main Tasker screen. You should be able to find PopSMS on the Scenes tab.

how-to-use-tasker-ss-003

Displaying a scene

So far, I’ve only shown you the scene creation part. That scene will be useless unless it is shown or displayed. So, we need to create a task for displaying the said scene. Then, the task needs to be linked to a context; in this case, the context will be an event, specifically, the event where the phone receives a text message.

  1. Open the Tasks tab. Create a new task by tapping the Add button (plus sign) at the lower-right corner. Name the task anything you want. In this example, I name it “ShowText.” Tap the checkmark to save the name.
  2. On the Task Edit screen, tap the Add Action button (plus sign). Then, tap Scene > Show Scene.
  3. On the Action Edit screen, tap the magnifier icon at the right side of Name and select “PopSMS,” which is the name of the scene that we created earlier.
  4. From the drop-down list under Display As, select ” Dialog, Dim Behind Heavy.” This will cause the scene to be shown as a dialog box, with everything behind it dimmed heavily.
  5. Tap the virtual Back button until you reach Tasker’s main screen. You should be able to see “ShowText” listed on the Tasks tab. The task now needs to be linked to a context in order to execute it.
  6. Open the Profiles tab. Create a new profile and context by tapping the plus button at the lower-right of the screen. Select Event > Phone > Received Text. Just leave the default event settings as they are for now.
  7. Tap the virtual Back button to return to the main screen. You’ll be shown a popup list of tasks to link to the new context and profile. Select “ShowText” from the list.
  8. Make sure that the newly created profile is enabled so that Tasker can execute the associated task when triggered.

The example above, of course, is a very rough one. But, if you have the time and the patience, you can refine it further. Tasker lets you tweak a lot of the details.

Using variables

If you’ve ever done some programming before, you’ll be familiar with the concept of variables. They’re close kin to variables that you keep hearing about in algebra class. To define it simply, a variable is a name for a value that changes over time.

Just like scene creation, Tasker variables are also complex topics that deserve their own separate tutorials. I’ll talk briefly about them, though, just to let you know what immense power you’ll get if you just patiently climb the steep hill of learning how to use Tasker.

20130430_160518

In the previous section about scene creation, you encountered two variables represented by %SMSRB and %SMSRN (for SMS Text Body and SMS Sender Name, respectively). These are examples of built-in variables that you can use in Tasker. You cannot set, create, or define these kinds of variables. (That’s why they’re called “built-in.”)

Tasker variables always begins with the percent (%) symbol. Variables in all uppercase are built-in variables. They are usually derived from system information, device states, or events. Some common examples are %TIME (current time), %DATE (current date), %BATT (current battery level), and %WIFI (whether Wi-Fi is enabled or not).

Aside from built-in variables, there are two other variable types: local and global. Both are user-defined and user-created. The main difference between them is that local variables can be used only within the task or scene in which they are created, defined, or used; global variables are accessible to all of Tasker. Another main difference is in capitalization: local variables use all lowercase but global variables have at least one uppercase letter in its name.

You’re nearly done with this general tutorial about Tasker. If you want to learn more about how to use Tasker, or review in a visual way what I’ve discussed so far, you can watch our video tutorial in the next section.

Comments