Support Conditional task problem

Discussion in 'Android Apps & Games' started by Tiwas, Nov 24, 2016.

  1. Tiwas

    Tiwas New Member
    5

    Nov 24, 2016
    2
    0
    5
    Male
    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?
     

    Advertisement

  2. Thom

    Thom Well-Known Member
    VIP Member
    6,143

    Feb 16, 2011
    11,236
    4,608
    6,143
    Male
    Software Developer
    Keene, NH USA
    Welcome to Android Forums.

    If I followed it correctly ... name the unnamed task.

    ... Thom
     
  3. Tiwas

    Tiwas New Member
    5

    Nov 24, 2016
    2
    0
    5
    Male
    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.
     
  4. Thom

    Thom Well-Known Member
    VIP Member
    6,143

    Feb 16, 2011
    11,236
    4,608
    6,143
    Male
    Software Developer
    Keene, NH USA
    %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
     
  5. Thom

    Thom Well-Known Member
    VIP Member
    6,143

    Feb 16, 2011
    11,236
    4,608
    6,143
    Male
    Software Developer
    Keene, NH USA
    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
     

Share This Page

Loading...