• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Conditional task problem

Tiwas

Lurker
Hi,
I'm trying to create a task that will only run if none of the specified profiles are active. But...before I can do that I need to get the list of active profiles. After a lot of fiddling around, here's where I'm at:

Tasker displaying "Hjemme" and "From 23:00 till 06:00" as active

Task:
Variable set %pactive to %PACTIVE

Flash text %pactive
%PACTIVE
%PACTIVE(#)
%PACTIVE(#?)

Output:
%PACTIVE
%PACTIVE
0
%PACTIVE-1,%PACTIVE0

Anyone able to see how come this isn't working the way I want it to? I should get a string with the two profile names in them and %PACTIVE(#?) should return 2. Right?
 
Uhm? Not sure I'm following you. I'm trying to get the list of active profiles so I can compare to the my list. What I'm doing is that I'm making a "Normal" profile. If I'm at home and go out, it should set the "normal" settings, but if I'm at home and it's at night, it should not.

So...for now I just need to see which profiles are active - but Tasker's saying none are even though I can see two of them are.
 
%PACTIVE is a comma delimited list of active Profiles that have names. If you have an unnamed Profile it will be marked green but will not be in the list.

One of your profiles is apparently named and the other one is not.

How about ...

Give "From 23:00 till 06:00" an arbitrary name like "Named"

If
%PACTIVE ~ *,Hjemme,*
AND
%PACTIVE ~ *,Named,*

... Thom
 
You might also like toi try something like this ...

devA
A1: Variable Set [ Name:%pactive To:%PACTIVE Do Maths:Off Append:Off ]
A2: Variable Split [ Name:%pactive Splitter:, Delete Base:Off ]
A3: Flash [ Text:%PACTIVE
%PACTIVE(#)
%PACTIVE(#?)
------
%pactive1
%pactive2
%pactive3
%pactive4 Long:On ]

... Thom
 
Back
Top Bottom