Invert selection on certain elements option

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

User avatar
Posts: 2709
Joined: 21 Jul 2017 17:50

Invert selection on certain elements option

Post by Desmanto » 17 Aug 2017 03:15

Hi Martin,

For some elements which have the multiple checkbox choices, is it possible to have option to select the inverse?

For example, I have a flow with trigger UI Event. The original idea is to detect "Event Type : Window opened" in every app. So if there is some rogue app inject full screen ads, we can know which rogue app send that ads. It can be used for other purpose as well. Package Name was filled with * (match all apps)

But turns out the flow triggerred too often by the nova launcher. Since we navigate a lot using launcher to access other app. I also open automagic frequently, and it also get triggerred. So I want the trigger to be all apps except automagic and nova launcher. But there is no way to exclude the app (just realize tasker profile have app invert mode). I can only choose all apps and unselect automagic and nova. But that is not the solution. Since if I install new apps, then those apps will not be included, I have to readd them manually.

The other way around is to keep the filter with * (match all apps), then add additional condition to check if the packagename is automagic or nova, then it won't continue the flow, stop at there. But this has the problem, as the flow still get triggerred and executed first before stopping. I set the flow execution policy to number 4, "Stop the currently ....", because I have a sleep delay that will be reset if the flow get executed again before the timeout. Since it is triggerred again, the sleep get reset, but no new information is show.

If we can have the options for invert selection, then I can just choose automagic and nova, set it as invert. Then only all other apps beside these 2 can trigger the flow, and no more resetting without new info.

There are still others, such as Trigger : Wifi connected. I have my Automagic remote server turn off only when I am connected to wifi which is not my home wifi SSID. If I select all wifi and unselect my home wifi; next time I connected to new wifi, those new wifi won't included in the trigger, still have to readd them manually. Of course these are just example use of the invert.

Actually at the action related to flow (execute flow, set flow state, Stop flow), we have the option to exclude the flow pattern already. Maybe you can add something like that to exclude selected app/wifi/any similiar option. Or maybe a checkbox to select inverse/invert/exclude mode/blacklist mode/or any similiar name. The idea is to invert, to NOT (negate) the selected option.

The other similiar menu related to this is for the text field where we can choose from Contains text, matches glob, matches regex (such as the one in UI Event). Probably can add some inversion as well. Add option : doesn't contain text, doesn't match glob, and doesn't matches regex.

I know this will be quite difficult, as it affect a lot of elements. So I try to list out all affected elements which can make use of this invert mode. The one with * means have the text field : Contains text, matches glob/regex.

01. App Package Event
02. App Task Started
03. App Task Ended
04. Calendar Event
05. Gmail Unread Conversation Count
06. Incoming Call
07. K-9 Mail Received
08. Notification On Screen Displayed *
09. Notification on Statusbar Displayed *
10. Notification on Statusbar Removed *
11. Notification on Statusbar Selected
12. Outgoing Call
13. Phone Cell CDMA
14. Phone Cell GSM
15. SMS Received
16. SMS Sent
17. UI Event *
18. Wifi Connected
19. Wifi Disconnected

01. App Task Running
02. Battery Level BLE
03. Bluetooth Device Connected
04. Calendar Event
05. Gmail Unread Conversation Count
06. Notifaction on Statusbar Displayed *
07. Phone Cell CDMA
08. Phone Cell GSM
09. Wifi Available
10. Wifi Connected

01. Connect/Disconnect Bluetooth Device
02. Delete Flows
03. Execute Flows
04. Hide Custom Widget Overlay
05. Init Variable Contact List (groups)
06. Init Variable Package Info
07. Init Variable Media Session
08. Remove Notification on Statusbar (General - Spesific)
09. Request Sync
10. Set Auto Sync State (spesific)
11. Set Flow State
12. Stop Flows

There are actually some more elements using android wear or CM profile which I don't include here. Since probably most people only use one. For flow related action, some of them have the exclude pattern already.

Sorry for the long post, and thanks for reading until finish.

Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.