🏠 📩 📨Projects
Install Task
Some of my projects require a few small files downloaded. For these projects there will be a task called IN Install … in the project. Run this task to automatically download the files. The install task can be deleted if you wish once it has been run. You can choose where to save the files. The install task will create any directories that are required. By default the files are created in directories under the normal Tasker directory. There may be directories called “javascript”, “userdata”, “templates” etc. If you chose a different location for these directories, you will need to edit one or more tasks in the project to change a variable %filesbasedir to your chosen location.
Beta Tester Tasker
The version of Tasker in Beta Testing has some very useful features. The new text dialog action is very useful. When it is released to production Tasker I will replace the scene that the install process uses.
A very powerful new feature is pass-through of local variables. Where possible I have avoided using these to allow my projects to be installed on the production version of Tasker. Some projects do use this feature. They are marked below. To use these projects you either need to join the Beta Testing program via the Play Store, or wait until the new production version of Tasker is released.
Import clashes - importing more than one of my projects
Some of my projects are entirely self-contained. Others may share a profile. Those with the import task share tasks and a scene.
Tasker may respond to import clashes (importing a new project that contains profiles, tasks, and/or scenes that already exist with the same name) in different ways. Currently I have seen:
- Scenes: Tasker rejects importing the project and identifies the clashing scene.
For my projects this can only happen with the _TO Text Dialog scene used by the import task. The install notes suggest you delete this scene once you have run the install task. Find the scene in the other project and delete it. Then rerun the import.
- Tasks: Tasker silently rejects the task. Any perform task actions will run the task that is already in place.
For my projects, this is not a problem.
- Profiles: Tasker list the same profile in both projects. But it acts like one profile. I think it only triggers once, and it only appears once in the %PENABLED variable.
However, there is a gotcha here. If you delete a project that contains the profile, choosing “Delete Content”, it is deleted from all projects. However, if you manually delete the
profile first, and then delete the project with “Delete Content” it is not deleted from the other projects.
For my projects this can only happen with the optional Runtask Intent Received profile. If you use this, manually delete it before deleting the profile that contains it.
Compiled Code
A few of my projects include an optional Tasker task compiled by the Tasker App Factory. If you want to use this, you can compile the task yourself, or download it from this site. Though my tasks are safe, I would always recommend compiling tasks yourself, as that way you can check that they don’t contain malicious code.
The first time you run one of my compiled tasks, you will see two notifications. One advises that Tasker needs to be given permission to appear on top of other apps. This is not neccessary for my tasks, so just tap on “Stop Reminding”. The other says it is a useless notification. Go to the notificaion setting and turn off the “Placeholder” and “Monitor” notifications.
Naming Conventions
- Most tasks in a project will start with two or three uppercase letters followed by an underscore. The two letters indicate the project on my phone. For example CH_ indicates tasks in the charging section. When there are three letters the third letter indicates a subset of tasks.
- Tasks that are only invoked by Perform Task (ie subroutines/functions) have the two/three letter code preceded by an underscore. This makes them easy to select when coding.
- Global variables start with the same two or three letter code and underscore.
- Some tasks enable and disable some of my profiles. These profiles can be identified because their names always end in *
HTML Writer
If you are writing Html, then using an IDE is obviously the best way to go about it. But sometimes you might have some spare time when you only have your phone, and you want to write that Tasker Scene WebView Element, or add something to your website. When using a text editor such as Quick Edit this project takes you close to using an IDE.
The best way to see what this project does, is to watch the video.
Video
Details
Installation
Use
Usage is simple. Start task TL Write Html.
For an entity or other static text:
Tap on Entities. Then tap on the entity you want. The scene will close and you can now paste the html into your text editor.For an element:
Tap on the element you want. If the element does not have any attributes defined for it, the scene will close and you can paste the html into your text editor. If there are attributes defined for the element, they are presented and you can check any that you want. Tap on submit, the scene will close and you can paste the html into your text editor.
Customisation
The project comes with many useful html elements and attributes already configured, but it is very easy to change them and add more.
There are three files that define the html:
- entities.txt: Put any html entities or other static text here, one entry per line.
- elements.txt: There are four items per line, separated by →:
- The element name that will be shown in the selection scene.
- The starting html that will be placed before any selected attributes.
- The trailing html that will be placed after any selected attributes. Any £ (pound) characters will be replaced by a new line. Any ~ (tilde) characters will be replaced by a tab.
- A number in the range 0-2. This is a code indicating how attributes will be added to the element:
- No attributes are added. For example this is used with the element <br> Once such an element is selected the scene will close, ready for text pasting.
- Only attributes marked specifically for this element will be shown on the attribute selection screen. For example, this is used with the <input type="hidden"> element to limit the attributes available for selection to name and value.
- All attributes marked as for general use, along with those attributes marked to be specifically used with this element will be shown on the attribute selection screen. For example, this is used with the <input type="checkbox"> element to allow all general attributes, such as id, along with the specific attribute checked.
- Always end each line with → to ensure line endings do not cause a problem.
One other type of line can appear in the elements.txt file. These start with #. If text is present after the # the text is centred with a line either side of it (see the video). If the # appears on its own, a horisontal line is drawn.
Example:
br→
→0→ hidden→→1→ a→→2→ textarea→With this example the <br> element will have no attributes. The <hidden> element will only show attributes specifically marked for it. the <a> element will paste with the href attribute always present. There is no need to select it on the attributes scene. The <textarea> element will paste with the rows and cols atributes always present. Unlike the <a> element, they will be present after all selected attributes, rather than before them. Centred text “input type=” will appear above “checkbox”
- attributes.txt: There are three items per line, separated by →:
- The attribute name that will be shown in the attributes scene.
- The attribute value that will be added to the html element.
- An identifier that indicates which elements this attribute applies to. If * it applies to all elements that have an attribute selection code of 2 (see above).Otherwise it is a list of element names separated by : (colon). The name must match a name in the first field of the elements.txt file.
- Always end each line with → to ensure line endings do not cause a problem.
Selected attributes are added to the html element in the order they appear in the attributes.txt file.
Example:
id→id=""→*→ name→name=""→checkbox:hidden:select:text:textarea→ With this example the id attribute is shown for all general elements. The name attribute will only be shown for selection with five specific elements.
Global Variables
None.
Logging
When debugging, it is often useful to log data. This project lets you do that and provides an easy way to view the log.
Video
Details
Installation
Use
To log data in your task, add a Run Task action for _TL Log It. %Par1 is the name of the log. Wherever you use the same logname, data will be appended to the same log. %Par2 is the data you want to log. Prefix the logname with © if you want the log displayed immediately after the log is updated (call). Prefix the logname with ® if you want to wipe the log clean before it is written to (replace). Prefix with ©® if you want to do both.
To view logs, start TL Show Log.
Customisation
There are two characters that have special meaning to the logger, see below. If these are not available on your keyboard edit _TL Log It and choose some other characters.
Global Variables
None.
Debugging local variables
Sometimes, when debugging a task, you just need to see the value of local variables and perhaps change them. By copying in just two actions at the start of the task you are debugging, you can now display and change local variables. You can even add a limited type of breakpoint.
Video
Details
Installation
Customisation
Use
Open the task Copy Code and copy the first two actions. Paste these into the start of the task you want to debug. Step through the task you are debugging. When you want to see local variables, run the task TL Show Debug. I prefer launch this from the Samsung Sidebar, but you could just step out of the debug task and launch it from the Tasker editor. Or you could use a profile, perhaps by shaking your phone.
Watch the video to see how to use the user interface to view and change variables, create new ones, expand and collapse arrays, etc.
This project reserves variable names starting %debug_ for its own use, so you should never use these variable names yourself, just in case you wish to debug the task.
To add a pseudo breakpoint, copy the last action from Copy Code and paste it to the point where you want to pause the task. The variable viewer will be shown when the action is reached. It is only a pseudo breakpoint, so you can only resume the task running when you have inspected / changed variables. You cannot switch to single stepping as you would with a real breakpoint. It is very important to resume the task you are debugging. If you don't it will be left hanging and you will soon be unable to start new tasks. If this does happen you can either stop and restart Tasker, or use an action to kill named tasks for the name of the task you were debugging. In general, it is much better to start your debugging by single stepping through the task to be debugged if at all possible.
The debugger is slow. It's written in Tasker and it has a lot to do. Be patient, it's better than nothing. If you can get away with just logging a few variables, using my Logger project might be better.
Global Variables
None.
Fast charging
Your phones battery with have a longer lifespan if you turn off fast charging and leave it off most of the time. The problem is that when you need to turn it on, it’s a bit of a trawl through settings to get to turn it on/off. This project creates tasks that toggle the setting for you. On my phone I have wired fast charging in the quick settings, but leave wireless charging as a shortcut on the home screen. I have fast wired charging automatically turn off when I unplug my phone, but this is optional.
Details
Installation Task
There is no installation task for this project.
Customisation
Remove the Custom Setting Action from CH Wired Charging Off if you don’t want fast wired charging to revert to off when you unplug your phone.
If you don't want to have fast charging in your quick settings panel:
- Remove all Setup Quick Setting Actions from all tasks.
- Delete the profile Monitor Start.
- Delete the task CH Initalise task.
This project user the 1st Tasker Quick Setting. Change all the Setup Quick Setting Actions in all tasks if you are already using the first setting.
Manually add the Tasker Quick Setting to your quick settings panel.
Global Variables
- CH_WiredCharging
- CH_WirelessCharging
Turn off Bluetooth reminder
If you don’t need Bluetooth on, your battery charge will last longer if you turn it off. My earbuds automatically turn on Bluetooth when I take them out of their case. I found I was forgetting to turn Bluetooth off again when I’d finished using them. This project issues a notification fifteen minutes after the last Bluetooth device has disconnected. The notification is cancelled if another Bluetooth device connects.
This project uses the Auto Notification plugin. You can edit the tasks to use the standard notification if you don’t have this plugin.
Details
Installation Task
There is no installation task for this project.
Customisation
If you don’t have the Auto Notification plugin, you need to:
- Delete profile Turn BT Off and task Turn BT Off.
- Edit tasks Bluetooth Off Notification and Bluetooth Cancel Notification to replace the plugin with standard Tasker notification actions.
Alternatively, you could purchase Auto Notification. It’s one of the most useful plugins and does not cost very much. It’s well worth it.
If you have a led case, you can flash an icon on it when the notification is given reminding you to turn off Bluetooth. You need to compile LedCaseNotificationBT using the Tasker App Factory. Or if you prefer, you can download the compiled app and install it. You will also need to activate the last activity in Bluetooth Off Notification.
The first time the app runs, you should edit the settings for the notification. Turn off Monitor and Placeholder. If find it useful to assign a different sound to this notification. You will also receive a Tasker notification about display on top permissions. Just tap stop reminding on this notification.