1. HUGE Androidforums.com UPDATE! Learn what's new (and download the new app!)
    Dismiss Notice

Conditional task problemSupport


Last Updated:

  1. Tiwas

    Tiwas New Member This Topic's Starter

    Joined:
    Nov 24, 2016
    Messages:
    2
    Likes Received:
    0
    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 Guides Guide

    Joined:
    Feb 16, 2011
    Messages:
    11,042
    Likes Received:
    4,474
    Welcome to Android Forums.

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

    ... Thom
     
  3. Tiwas

    Tiwas New Member This Topic's Starter

    Joined:
    Nov 24, 2016
    Messages:
    2
    Likes Received:
    0
    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 Guides Guide

    Joined:
    Feb 16, 2011
    Messages:
    11,042
    Likes Received:
    4,474
    %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 Guides Guide

    Joined:
    Feb 16, 2011
    Messages:
    11,042
    Likes Received:
    4,474
    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...