I have a plugin that can be called from several tasks. I want to know which of those tasks fired.
BTW, I figured out that I was calling setVariableReplaceKeys in EditActivity.on create and not finish. It now works. But interestingly, it replaces Tasker variables like %TRUN and %PENABLED but not %PACTIVE. Is this a bug?
George
BTW, I figured out that I was calling setVariableReplaceKeys in EditActivity.on create and not finish. It now works. But interestingly, it replaces Tasker variables like %TRUN and %PENABLED but not %PACTIVE. Is this a bug?
Where/when does %PACTIVE get set? %PENABLED is set. To test, I created a pop up and printed both variables. %PENABLED is replaced correctly, %PACTIVE is not.
George
Where/when does %PACTIVE get set?
From the User's Guide.
Profiles Active (dynamic)
%PACTIVE
A comma-separated list of the currently active, named profiles in activation order. Duplicate names will appear on the list only once. The list always starts and ends with a comma to make matching easier, if it's not empty.
This description for PACTIVE (which isn't replaced) looks very similar to PENABLED (which is replaced). Only the word "enabled" and "active" are different in the two descriptions. What am I missing by just bring pointed the Variables section of the User's Guide?
George
--
You received this message because you are subscribed to the Google Groups "Tasker - Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taskerdev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
%PACTIVE is not replaced at all. I would have expected to have an empty list returned (per the documentation, "the list starts and ends with a comma to make parsing easier") as opposed to the literal string "%PACTIVE". That indicates to me that the variable never gets replaced as opposed to no active profiles. Do I need to check for the variable name as a value to indicate that the list is empty and that there are no active profiles?
That being said, wouldn't there be at least one active profile at the time my task was fired - namely the one that actually caused my task to fire? In my case, I have a Geofence Inside event.
George
Per your response (read "Uninitialized Variables" in the User's Guide) and my response below, am I to conclude that this is an error in the documentation quoted below stating that Tasker supports the global variable %PACTIVE when it really doesn't, or this is a bug in Tasker and is is not replacing the global variable when it should?
George
--------------
%PACTIVE is not replaced at all. I would have expected to have an empty list returned (per the documentation, "the list starts and ends with a comma to make parsing easier") as opposed to the literal string "%PACTIVE". That indicates to me that the variable never gets replaced as opposed to no active profiles. Do I need to check for the variable name as a value to indicate that the list is empty and that there are no active profiles?
That being said, wouldn't there be at least one active profile at the time my task was fired - namely the one that actually caused my task to fire? In my case, I have a Geofence Inside event.
George
You forgot to quote the "IF, it's not empty"! That means if it is empty will not starts and ends with a comma, when reading this variable with no profiles active you get "%PACTIVE" as value. I have tested here and it works like described in documentation.