AutoPebble Variables in Command Filter

Discussion in 'AutoApps' started by Daniel D, Jun 10, 2015.

  1. Daniel D

    Daniel D Member

    Joined:
    Feb 11, 2015
    Messages:
    127
    Likes Received:
    11
    Hello there,
    I'm trying to somehow simplify the menus on my pebble and for that I've decided tot use arrays for the menus (both labels and actions). And because I'm a little lazy, I thought that I could refer to the actions' names stored in the array also when setting up the profiles that are triggered by each menu item. So I set up the command filter to be something like "main=:=%MenuItem(2)". Just that it doesn't seem to work. It only works if I write down the actual value of the second menu item, like this "main=:=Actual Value" (without quotes, in both cases).
    Is this the intended behavior? Am I doing something wrong?
    Thanks!
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,476
    Likes Received:
    797
    That should work, I think although I've never tried it :)
    Are you absolutely sure %MenuItem(2) has the value you want?
     
  3. Daniel D

    Daniel D Member

    Joined:
    Feb 11, 2015
    Messages:
    127
    Likes Received:
    11
    It works, but I've also found 2 important things:
    1. A list of comma separated elements is not automatically treated as an array inside Tasker. I can use %MenuItem (%MenuItem='Item1,Item2,Item3') for labels and actions, but I have to do a Variable Split it in order to reference each item.
    2. One command from Pebble's side of AutoPebble can only trigger one profile. If there's a profile that is triggered by any command (through RegEx), any command will trigger that profile, and no other profile.
    Thanks!
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,476
    Likes Received:
    797
    Great :)

    1. Yes, that's correct.
    2. That's not correct unless you clone the profiles. Did you do that?

    Thanks!
     
  5. Daniel D

    Daniel D Member

    Joined:
    Feb 11, 2015
    Messages:
    127
    Likes Received:
    11
    I cloned a profile then I changed the command filter on the newly cloned profile. Is this a feature or a bug, cause I cannot make my mind up?!
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,476
    Likes Received:
    797
    Lets call it a limitation of the plugin system :p
    The trick is to never clone profiles with plugins and it should always work :)
     
  7. Daniel D

    Daniel D Member

    Joined:
    Feb 11, 2015
    Messages:
    127
    Likes Received:
    11
    Good to have someone with deeper understanding around.
    Thank you very much!

    PS: Man, both you and Pent should hire somebody to get the documentation up to speed with the latest developments.
     
    Last edited: Jun 11, 2015

Share This Page