r/tasker • u/Ratchet_Guy Moderator • Aug 17 '21
Discussion Share Your Tasks That Help You Use Tasker!
This is going to be a very important and useful thread. It will be linked in the sidebar. It will help thousands of people.
Throughout the years many folks have created Tasks that are 'Assistant' Tasks, or 'Helper' Tasks, or 'Test' Tasks and Tools, and here we're going to compile them all in one thread, as many as possible.
So please post any Tasks you have that help or assist you with any aspect of Tasker and/or its plugins. For example I created the AutoInput "UI Query Task/Tool" a while back, and still use it all the time.
As replies to this thread come in I'll be posting the links and descriptions up here in the OP. And now I shall put forth a few Tasks that I've found to be so very useful:
- Float Your Widget v2's with "Overlays" - Forever Change How You View and Edit Tasker Widgets! - Now you can detach your Widget v2's from the homescreen and float them over any app or screen on your device! Including while in Tasker for instant viewing of your widgets in real time while you edit them 😃 (eliminating the need to constantly switch to your homescreen to view widget updates!)
- AutoInput UI Query Test Task/Tool - helps you 'see' exactly what AutoInput 'sees' when it looks at the screen. Helps to easily find text, element id's, coordinates, etc. Details and images at link above. Quick download links - Main Task and Companion Task. Requires AutoTools plugin.
- AutoNotification - View All AN Variables - Since AutoNotification generates a massive amount of variables and values [pic] - you'd previously need an awful lot of Flash actions and time trying to find what's in a notification. This gives you the values of all the AutoNotification Variables. Details and images at link above. Quick download - Main Task and Companion Task. NOTE: This v4 now Requires no additional plugins.
- Tasker Scene Positioner!!! - Now that Tasker Scenes can be placed over the Status Bar (including the front camera) or over the Navigation Bar by using the "Allow Outside Boundaries" and "Blocking Overlay+" options - placing them often involves negative x/y values and a bunch of tedious trial and error getting Scenes into perfect positions, down to the exact pixel. This will help you get it just right! (Added 06/10/23 - more info and images )
- Show All Data In the %evtprm() Array - Many Event Profiles in Tasker pass additional data into the linked Task in an array named
%evtprm()- but it's not always clear how much data there is or what the values are. This Task gives you a quick way to have a look.
- Set Multiple Variables In One Action Using Simple name=value Pairs - This lets you set multiple variables in one Action by listing in them in
%datain the format ofvarname=varvalueone pair per line. A quick way to set a bunch of variables that uses a format slightly different than Tasker's built-in "Multiple Variable Set" Action. (more info)
- Tasker Scene Manager - Generates a simple list menu of all currently active Scenes and whether they are created/visible/hidden/etc - very helpful if you have a lot of Project Folders and Scenes, since some/many could be active without you even realizing it ;) Link to reddit thread. related to this Task/tool.
- Tasker Action Error Handler / Flash'r - Easily find out which Action(s) if any are generating errors in all of your Tasks. This will Flash (and/or log to Clipboard) the Task Name, Action Number, and Error Details wherever and whenever you would like them! (Added 06/09/23 - more info )
- Easy "Flash" Actions using the new "Tasker Layout" Options - With the recent addition to the "Flash" Action of the "Tasker Layout" option - what used to be a simple 2-field "Flash" Action now can contain about 10 more fields to give you complete control of every aspect of your Flashes.. This Task makes it much easier to configure via a simple "Perform Task" call with parameters in
%par1and%par2. (Added 06/16/23 - more info )
- View All Tasker Built-In Globals - Ever have the urge to see every built-in Tasker Global and its value in a single glance? This Tasks gives you most of them.
- View All Tasker User-Created Globals - Ever have the urge to see all your User Created Tasker Global variables and their values/lengths in a single glance? This Task will show them to you.
- View All Hidden Project/Profile/Task Variables - In more recent versions of Tasker, a new class of variables have been added, whose scope is limited to the Project, Profile, or Task they are in. One issue with this however is that to see their names and values you usually have to look in many different places. This Task finds them and lists their names, values, and where they are!
- Query All Installed Plugins - Ever wonder exactly which Tasker plugins are installed on all your device(s) at any given time? This Task will generate the lists you need :)
- Quickly Edit Any Task - this quick menu helps avoid the time-consuming process of having to open Tasker, find the Task, open it to edit it, save it, save Tasker, exit Tasker,. etc by instead taking you directly to the Task Edit Window! (added 08/17/21 more info )
- Tasker Permissions Checker - Have Tasker Check for Non-ADB Permisions - A Task that use the little known "Ask Permissions" Action to go through a list of permissions that can be granted to Tasker without ADB. (added 08/17/21 more info.)
- Quick Color Picker - Use this to quickly pick colors for use in Tasker Comments, Labels, and Anchors or anywhere you need a hex color! It uses all built-in Tasker Actions, no plugins required. (added 08/18/21 more info )
- Get All Task Names in a Tasker Project - This Task will return the Task names for any given Project in Tasker. Can be useful if you have a Project with a lot of Tasks and just want a log/listing of them. (added 10/18/21 more info )
- Find All Test Tasks with "Keyword" in Their Name - Want to quickly find Tasks with a specific keyword in the Task Name? This Task will tell you how many you have and what their names are, and allow you to easily edit or re-name the Tasks. You can configure it to use any keyword you want and it will show you the relevant Task list. Better way to search for Tasks than Tasker's built-in Search function.
- "Map Tasker" Visualizer for OS X Mac - MapTasker is a program that runs on your (OS X) Mac, reading your backup xml file and displaying your entire or partial Tasker setup in a viewable format in your default browser. MapTasker helps visualize and understand your Tasker projects, profiles, tasks and scenes. It also helps you read and decipher raw Tasker XML including Action Codes, etc.
- How To Use Colorful Icons For Your Tasks / Task List and Homescreen! Many folks may not be aware but you can colorize the icons in the "Material" Icons list when choosing an icon for your Tasks, so that you can colorize and color-code your Task List as well as your Homescreen Tasker Icons when placing Tasker Shortcuts and Widgets on your homescreen.
EDIT: Any "tips or tricks" for using Tasker can & should also be included/posted here in this thread. For example - adding something like IF %caller() ~ ui to any Action (typically "Variable Set" for test values) is a great way to have those Actions only run when the Task is being run inside the Task Edit window for testing purposes, without having to power Actions on or off :) So - let us hear your tips & tricks!
8
u/Ratchet_Guy Moderator Aug 19 '21 edited Oct 15 '23
TASKER TIP - Keep your loops from infinitely looping!
Anytime you create a loop in Tasker, typically by using an
IfAction along with aGoto- you should (almost) always put a failsafe Action in the middle of the loop to keep it from looping endlessly.Two great methods for doing this are either:
Example:
Now if in that code segment if the condition in A1 never resolves, that loop will continue to infinity. Or until you turn off Tasker or reboot your device. To fix this using a counter it would look like:
And adding those Actions in A3 and A4 above would end the loop after 10 iterations. Another method is:
%qtimeto timeout the loop after a certain number of seconds. Example:And that extra
Ifin Action A3 will end the loop after 60 seconds. Note that%qtimeis one of the few built-in Tasker local variables. Much like%caller()etc. and in the middle of any Task that is running - this local built-in Tasker variable always returns the amount of time in seconds that the current Task has been running for via%qtime.Hopefully by using one of these two methods you can keep your loops from running on for years at a time!
7
u/Ratchet_Guy Moderator Aug 17 '21 edited Aug 17 '21
QUICKLY EDIT ANY TASK - This one is going to save you LOTS of time!
I'm pretty sure everyone has those moments when your device is running a Tasker Task based on a Profile somewhere/sometime during your day, and you realize that the Task isn't working quite correctly.
And it could be because of an OS or UI update, or some screens have changed their text that AutoInput is supposed to click, etc. etc.
Usually - you need to open Tasker, navigate to the Project that contains the Task, then edit the Task, and then Save it and Exit Tasker, etc. etc.
With this Task it brings up a menu of Tasks you've specified. Upon clicking a Task name it brings you directly to the Task Edit Window for that Task!
Then you can make your changes, press the back arrow, and Tasker takes care of the rest, bringing you right back to the screen/app you were previously on in your device. (Here is image of the full Task).
Of course to make maximum use of the convenience of this Task you'll want to create a readily accessible shortcut to it from anywhere you find convenient. I myself have linked it to one of the buttons in Tasker's ever present permanent notification.
That way regardless of where I am in my device at any time, if I think a Task needs to be modified, I just pull down the notification bar and click it to bring up the menu.
(You'll notice in the image link above - this Task even tells you if you've misspelled a Task name or it is no longer present on your device ;)
8
u/Ti-As Aug 17 '21
Not a task but for debugging a task I regularly use condition
If %caller() ~ uito see/test contents of variables/arrays.4
u/Ratchet_Guy Moderator Aug 19 '21
Quick Color Picker - I use this to quickly pick colors for use in Tasker Comments, Labels, and Anchors. It uses all built-in Tasker Actions, no plugins required. (image of Task)
It basically shows you Tasker's Color Picker dialog, then prompts you to confirm the color by showing you text in the color chosen, and lastly asks if you'd like the color placed inside
<font>tags.Upon confirming - it simply puts the color in the clipboard.
If you'd it not to prompt for font tags simply un-power that Action. Note also that this Task doesn't utilize any 'transparency' assigned to the color by the Color Picker dialog, it simply removes that (if any) from the color's hex code.
3
u/Ratchet_Guy Moderator Aug 17 '21
Tasker Tip: Save Time Testing and Editing Scenes with the Edit Scene Action
That links to a thread that describes in full detail how to use Tasker's "Edit Scene" action to avoid having to go through the sequence of having to open Tasker, navigate to the Scene in the Scene Tab, open the Scene, edit it, Save the Scene, Save in Tasker, Exit Tasker etc.
3
u/JD_Number_6 Dec 30 '23 edited Jun 07 '25
Add the Show Runlog Action to a Task You're Troubleshooting
If you're troubleshooting a task by running it directly from the editor you can easily jump between the editor and the Runlog by adding a Show Runlog action to your task and executing it manually after an error.
You can put the action after a Stop action or near where the task is failing, preceded by a Go To action to avoid having it executed during task execution.
And when you exit the Run log, you're immediately back in the editor --wherever you put the action (that, alone, is really handy if your task is a long one).
Since my tasks tend to be loooong and the editor usually takes me back to the top of the task, I put one there, by default:
Task: 121723
A1: Goto [ Type: Action Number Number: 3 ]
A2: Show Runlog
...
I find this much more convenient than exiting the editor, tapping the menu, selecting "Monitoring", and tapping "Run Log", then exiting, re-editing the task, and paging to the troublesome section of code.
UPDATE: One caution: since this lets you indefinitely avoid exiting the editor and seeing the ✔️ that reminds you to save your work, you might need to be a little more conscientious/proactive about doing so. At least unless/until we get an autosave feature </shameless grinding of my axe>.
4
u/Ti-As Aug 17 '21
And this truely crazy one for fastest creation of very large arrays 😉
2
u/VisuelleData Aug 17 '21
Not sure if my Easy Array Math post counts, but here it is.
4
u/EllaTheCat Samsung M31 - android 12. I depend on Tasker. Aug 17 '21
Forgive my execrable vanity, but that's why I posted my screen unlocker project yesterday, so people had working example code and some explanation. The subject is perennial.
Some may object, but as I've always said, Tasker helps me with my medical condition, and fiddling around with manual PIN entry is frustratingly error-prone. So I "automated my life".
It's a nice feature, but to my mind absolutely vital.
https://www.reddit.com/r/tasker/comments/p5h9jl/oc_samsung_m31_android_11_screen_unlocker_20210815/
There's more. I've made a 20 second video
https://www.dropbox.com/s/83iv8nykjc7ihpw/m31-2021-08-17-1230.mp4?dl=0
that shows
- Display On. Video lockscreen. Foxes video credit goes to Alex S.
- Display On: PIN being entered behind a cover so shoulder surfers are foiled.
- Display Unlocked. 3 widgets (not shortcuts) I use a lot, including my task menu and autovoice, placed into a "folder"and that "folder of widgets" being accessed from the edge panel. Credit goes to u/Ratchet_Guy for pushing me to do that.
Please note: AutoInput PIN unlock is only invoked when Smart Lock won't use auto-dismiss-keyguard, which is lightning fast,.
1
u/Ratchet_Guy Moderator Nov 20 '23 edited Nov 22 '23
How to Use Colorful / Tinted Icons For Your Tasks / Task List and Homescreen! - https://redd.it/17yrgum
Also as a note - Label fields inside Actions as well as "Anchors" accept full HTML markup, so you can make labels with font colors and other text formatting, include tags like
h3to make a really big label!1
u/Ratchet_Guy Moderator Dec 30 '23
Due to issues with Android 14 installing certain APK's (such as the Tasker Settings app from Github) there is now an APK Installer Task available. Details and discussion at that link.
4
u/xbxz Aug 17 '21
I recently created a task. Whenever someone logs into my account (or simply unlocks the system) whether in office laptop or office system, my phone will get a notification (& also send an email) and it will show a scene saying '{username} has logged in at {timestamp}.' along with two button. 'ok' and 'lock'. When ok is pressed, that user will be notified with generic windows message box. When lock is pressed, the system (pc or laptop which ever) will be locked again.
I have used auto remote, event ghost and power shell for this. Currently, I am removing the dependency of 'event ghost' and implementing my own service at certain port where I can do almost any operation without eg. In case any one needs any help in setting up above thing, do let me know. Happy to help.
4
u/webmediart Aug 27 '21
I'd be interessted in best practices/work flows to develop new tasks via PC (I find it tidious, to create a complex task on the phone).
1
u/Tintin_Quarentino Aug 18 '21
Hey thanks for sharing this, but the Step no 11(show Snackbar) just doesn't appear. I've given Snackbar app permission to draw over other apps, are there any other permissions to be given to it?
1
u/Ti-As Aug 18 '21
This one is one of my top favorites — a Time context based on %TIMES (plus calculation). The perfect solution for avoiding long-term Wait actions.
3
u/EllaTheCat Samsung M31 - android 12. I depend on Tasker. Aug 17 '21
"Toggling a profile on and off"
Don't waste a global variable for remembering whether or not a profile is enabled. If it is enabled, the name of the profile will be a substring of the system's already existing global %PENABLED.
3
u/VisuelleData Aug 17 '21 edited Aug 17 '21
Here's one I made for you u/RatchetGuy, the use cases are a bit obscure though.
It's for making global variables with variable variable-names.
7
u/guster09 Aug 17 '21
I use a very simple task that's not complicated, but has been very useful to me.
Basically, when on a call, speakerphone will enable when the phone is away from my face, but when I hold it up to my face, speakerphone turns off.
2
u/guster09 Aug 17 '21
I just remembered this other task that I had posted recently. I use it with AutoShare when I want to share an image from reddit. If it's an image I'd rather not send a link over Facebook messenger. So when I share and choose "AutoShare command" it triggers this task:
Without this, I had to download the image, open Facebook messenger, browse to the downloaded file location, select it, then hit send.
If there's a better way I'm happy to hear it. I've only been using Tasker for about a month now.
1
u/mikthinker Aug 22 '21
I've posted a task to automatically snap the camera shutter button a variable number of times. It was specifically developed with the Samsung Galaxy S21 Ultra in mind since it doesn't support a remote shutter (Bluetooth or otherwise). So I wrote my own for which the details are posted here.
1
u/sid32 Direct-Purchase User Aug 24 '21
This is my favorite double tap launcher task. Opens up music app, maps or remote depending on context
https://testsjoaomgcd.appspot.com/shares/?user=AS35m8mijzgu11T%2Bv4P5XGUCuyQylcuxX17kNjEf%2FDDr5Arovj2UsUqsQfxreYtt9i6MYw%3D%3D&id=Task%3ADouble+Tap
-2
u/ZellZoy Aug 17 '21
Asks for every permission I might need, especially root.
<TaskerData sr="" dvi="1" tv="5.13.5"> <Task sr="task21"> <cdate>1577204408069</cdate> <edate>1629210507844</edate> <id>21</id> <nme>Root Permissions</nme> <pri>100</pri> <Action sr="act0" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.ACCESS_SUPERUSER</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act1" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.PACKAGE_USAGE_STATS</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act10" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.ADB_WIFI</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act11" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.ACCESS_FINE_LOCATION</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act12" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.ACCESS_NETWORK_STATE</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act13" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.READ_EXTERNAL_STORAGE</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act14" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.WRITE_EXTERNAL_STORAGE</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act15" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.BLUETOOTH_ADMIN</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act16" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.BODY_SENSORS</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act17" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.KILL_BACKGROUND_PROCESSES</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act18" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.CALL_PHONE</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act19" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.WAKE_LOCK</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act2" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.INTERNET</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act20" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.SYSTEM_ALERT_WINDOW</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act3" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.DISABLE_KEYGUARD</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act4" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.RESTART_PACKAGES</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act5" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.PACKAGE_USAGE_STATS</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act6" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.WRITE_SECURE_SETTINGS</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act7" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.WRITE_SETTINGS</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act8" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.WRITE_SETTINGS</Str> <Str sr="arg1" ve="3"/> </Action> <Action sr="act9" ve="7"> <code>319</code> <Str sr="arg0" ve="3">android.permission.WRITE_SMS</Str> <Str sr="arg1" ve="3"/> </Action> </Task> </TaskerData>
0
u/[deleted] Aug 17 '21
[deleted] — view deleted comment
0
u/[deleted] Aug 18 '21
[deleted] — view deleted comment