25

New Global Variable %SCENES to List All Scenes Created (visible or not)

Right now there's variables for current Tasks running (%TRUN) as well as Profiles Active (%PACTIVE), Profiles Enabled (PENABLED), etc.

However - there's no Global Variable that contains a list of all Scenes currently 'created' - meaning they're active, whether showing or not.

So I am putting forth a request for a new Glboal Vairable %SCENES to contain the name of all active Tasker Scenes. Then using any of the names in this list a "Query Scene" action can be run to ascertain if it is visible, hidden, etc. 

2 replies

RD

Why is this not a thing already??? It's been four years and you have many thumbs-ups.  One the latest release of Tasker if I show a scene as an overlay (blocking) there is no way whatsoever to close it, even if I choose "show close button" or whatever.  There is no close button. It leaves my phone totally inoperable and I have to hard reboot it which is very annoying. If this variable existed I could have a backup action that would close all open scenes.  Or Joao could just fix Tasker so that the show close button feature actually works again, lol.

TP

I know right! I'll see if I can get Joao to add it in the next release. For the time being a few things - what device/OS/launcher are you using that the close button does not appear in "Overlay > Blocking" ? 

Because on my devices it's there. It is a very very tiny "x" in the lower right corner of the Scene. It is often hard to see and even harder to click on. I'll typically always add a way to to do it into the Scene, like a swipe in a certain direction runs a "Destroy Scene: %scene_name" Action.

Secondly - inside of Tasker in any of the "Scenes" Tabs - any Scene that is created/hidden/showing - its name will appear in green font in that Scene list. If you then long-click that Scene's name to highlight it, then go into the 3-dot menu in the upper right, you'll see "Destroy" is there. Just click it and poof, all gone!

Lastly, for a programmatic solution - in a Task you can use the Action "Tasker > Test Tasker" and then choose "Scenes" from the drop-down menu. This will return an array of all of your Scenes anywhere in Tasker. Then use a "For" loop to go through that array and use a "Destroy Scene" on each inside the loop. Make sure to check the box for "Continue Task After Error" since it may error depending on the Scene's current status.

But anyways this is the way to have a "backup action" (in this case a Task)  to close all Scenes (open or otherwise). In fact I think I'm going to create this Task and post on reddit in /r/Tasker in the near future, with some various options. Hope this all helps! 

JC

It's far from perfect, but one work around (when I think ahead) is to define the scene/objects to have 0 width and 0 height in landscape mode so that I can turn my screen sideways, return to Tasker and disable the system momentarily.