1
Declined

AutoInput option to clear default variables/arrays before query

Hello Taskers!

I would like to suggest a fix to something I don't necessarily consider a bug, but a weird behaviour sometimes, since I can't reproduce the error:

An AutoInput option to clear default variables/arrays before query.

I have a somewhat big task (more than 200 lines) that runs in loop, in which the first action was AutoInput UI Query, with infinite timeout, waiting for a specific app (99 Driver), and a 1 second wait between each loop.

It was running fine most of the time, but sometimes it started to do strange things not expected in the task.

After long hours of debugging and beating my head on the wall, I discovered a solution:

Clearing all default variables/arrays I was using in the task BEFORE AutoInput UI Query.

I really can't explain what caused this random weird behaviour, but I can assure it was related to the default variables/arrays not updating correctly if their not empty.

Thanks in advance!

RegiOween

1 reply

Hi! Unfortunately Plugins can't clear variables in Tasker, sorry!

The problem is that if you don't clear them, then values from previous queries will still be present and interfere with new queries :)

Maybe a solution would be an option in all plugin actions, in Tasker itself, to clear any arrays prior to setting them from plugins... Could you maybe add a request for that?

Thanks!