%pop should equal the last index number of the array.
> I could be wrong
Close...
From the guide..
%arr(#)
The number of defined array elements (4 in this case)
%arr(#>)
The index of the first defined array element, or 0 if none are defined (1).
%arr(#<)
The index of the last defined array element, or 0 if none are defined (4)
, but set variable %pop to %array(#), and pop position %pop.
>
So to do it this way I think you need..
%arr(#<)
I though %arr(#) would always equal %arr(#<), but maybe empty indexs are counted with one and not the other.
> Yep. I see. Defined vs. Last.
>
I would recommend Matt's suggestion ( he usually has a good reason for the approach he chooses) I have not tested this but to use %arr(#<) in the pop action you might need to set it to a local variable first.. :)
> Yep. I see. Defined vs. Last.
>I would recommend Matt's suggestion ( he usually has a good reason for the approach he chooses) I have not tested this but to use %arr(#<) in the pop action you might need to set it to a local variable first.. :)
--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/pgV32u3SJPA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.
Lots of ways to skin a cat with tasker, but I do:
Var Set %last to %arr(#<)
Array Pop %arr(%last)
As was suggested a few times. It works. I agree with Rich though...Matt usually has the best approach.
Sounds like beginner mode may be enabled. If so, Menu > Preferences > UI Tab > Beginner mood uncheck.
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
If you can't use a variable (by selecting the 'alternate' icon above the field [not present]) then yes, disable beginner mode.
> I dont have beginner mode on, just saw it will let me press the icon and select a variable but will not let me type the variable by hand.
Can not recall the exact reason for this but I do believe it is the way it is supposed to be.
Weird but the is away around it
Yes.
1. Use Matt's suggestion and set it to 99999
2. Use Jeremy's suggestion and set a local variable to %arr(#>) then use that variable in the pop action.
--