r/tasker • Direct-Purchase User • 6h ago

Help [Project Share] Tools to help using Tasker and interacting with variables

 

Click to download via Taskernet.

The code in this project is written with the assistance of AI tools.

The project will download the files from this repo https://github.com/mqwec43as/taskerkit

  

What does this project do?

  1. Save variables for any task.
  2. Recall saved variables for any task.
  3. Simulate task.
  4. Evaluate Tasker syntax with saved variables.
  5. Update taskernet regularly.

Requirements

  1. Tasker v6.8.0,
    1. Check java object in if condition.
    2. Access material symbol via Java code.
  2. Accessibility service, used to
    1. Retrieve text and set text to text field.
    2. Add Java code format quickly.
  3. WRITE_SECURE_SETTINGS permission and Get Screen Info action, they are used to.
    1. Read the current task.
    2. Read the current screen activity.
  4. Network Connection, used to.
    1. Download necessary files during import or update.
    2. Checking monitored taskernets update.

 

How to use

Setup

  1. Launch Show Kit Overlay task.
  2. Open a task and add a new Java code action as first action. if (taskerKit != void) taskerKit.log();
    1. Or long press the book icon on the overlay.
  3. This will log the variables when the task is not ran manually.
  4. It will recall the latest log vars in the first action if it's ran manually.

https://reddit.com/link/1ye1xw1/video/vv1ksxh8iv5i1/player

Accessing variable editor.

  1. Open action edit.
  2. Long press label button.

https://reddit.com/link/1ye1xw1/video/h3gdlof5iv5i1/player

More vids in the repo here https://github.com/mqwec43as/taskerkit#setup

  

How it works

This project works by storing tasker object temporarily and interacting it with. Thus we need to add at least one Java code action at the top of the task we want to monitor.

This is inevitable, since I can't find other ways to do this cleanly. At least the parts of adding the code can automated with accessibility service.

The tasker object stores various info about the task.

  1. Variables, we can access the current variables via tasker.taskVariables.
  2. Task details, like current action and action list.

Those data then will be stored to a database stored locally inside Tasker data space. Then reused accordingly.

 

Link & Credits

  1. https://github.com/mqwec43as/taskerkit
  2. Tasker action, event, and state ID mappings were extracted and adapted from Map-Tasker by mctinker. link.

 

Why creating this project?

To view the local variables anytime I want! Since Tasker as of today, doesn't support it yet.

This project also allow me to test my syntax as well :) I don't have to second guess if it's correct or not. I believe we all share the same struggles as well.

Obviously this is far from perfect. I still have to add one Java code action after all and the UX still sucks.

However I'd say this is quite good for POC, that Tasker can be made to view the variables. Who knows if Joao could consider implementing similar stuff!

 

Noted

Some parts still WIP not working expected. e.g

  1. Taskernet description in the notification.
  2. Testing simple regex pattern
  3. Other stuff that I don't know.

I still try to work on the doc as well. Especially on the parts of how the project works. My free token got depleted lol so I can't generate the doc easily.

Feel free to edit the code and report the issue here https://github.com/mqwec43as/taskerkit/issues/new?template=bug_report.md

3 Upvotes

0 comments sorted by