Expression - AND connection - (UND Verbindung)

Post your questions and help other users.

Moderator: Martin

Post Reply
S.M.T
Posts: 15
Joined: 24 Aug 2019 12:11

Expression - AND connection - (UND Verbindung)

Post by S.M.T » 31 Aug 2019 21:16

Hello,
i need help.
This will certainly be a simple code, but unfortunately I can not continue.
(Das wird bestimmt ein simpler code, aber leider komme ich nicht weiter.)

Code: Select all

true = condition == "false" AND condition == "false"
I thank you already now.

Greeting Sebastian
Attachments
help.jpg
help.jpg (15.72 KiB) Viewed 10280 times

User avatar
Rafi4
Posts: 281
Joined: 01 Dec 2017 05:23

Re: Expression - AND connection - (UND Verbindung)

Post by Rafi4 » 31 Aug 2019 22:52

Hi
I can't understand much. Upload total flow.

From record4
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1

S.M.T
Posts: 15
Joined: 24 Aug 2019 12:11

Re: Expression - AND connection - (UND Verbindung)

Post by S.M.T » 01 Sep 2019 09:09

Hi,
I'll try to explain it again. Two times condition type location false should pass the command true and open an app.
(Ich werde versuchen, es noch einmal zu erklären. Sollte die Bedingung 2x nein sein und eine App mit ja öffnen.)

Code: Select all

If Standort A is false AND the Standort B is false then ist true , to open App
If Standort A is true AND the Standort B is false then ist false , not open App
If Standort A is false AND the Standort B is true then ist false , not open App

Standort = location

Greeting Sebastian

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

Re: Expression - AND connection - (UND Verbindung)

Post by Desmanto » 01 Sep 2019 13:50

It can be done using condition execution count. You can't connect both to condition to the expression in this logic. Because if both are false, then both will execute that expression, so it will be executed twice. It can cause havoc or logical flaw if the element after it all got executed twice. (Launch app should be safe, but others might not).

Replace the condition expression with condition execution count, set to 2 and timed 100 ms. So if both evaluated to false, this execution will be executed twice in a very short time, ending up in true. Then continue to launch app.
If any of the other is true, then the execution count only executed once. Since it timeout after 100 ms (very short time), the counter is resetted again at next execution. Execution count used in this way, act as a buffer to collect multiple condition checking. You can add more condition before it, and simply increase the count for the total number of the check. So if you check for 5 location, use count 5.
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.

S.M.T
Posts: 15
Joined: 24 Aug 2019 12:11

Re: Expression - AND connection - (UND Verbindung)

Post by S.M.T » 01 Sep 2019 15:07

Desmanto wrote:
01 Sep 2019 13:50
Replace the condition expression with condition execution count, set to 2 and timed 100 ms.
That's a very easy solution. This works wonderfully. Thank you Desmanto.

Post Reply