3 way toggle task

36 views
Skip to first unread message

Duck Redbeard

unread,
Sep 30, 2010, 1:00:51 AM9/30/10
to Tasker
I have created a Tasker widget that toggles between car mode and home
mode. I really modified the ToggleTask that I got from the wiki
page. I would like to add a third state to this task. Can this be
done?

Duck Redbeard

unread,
Sep 30, 2010, 5:29:07 AM9/30/10
to Tasker
I am hoping to build this as one task, where each touch cycles the
widget to the next state then back to the start. I have got it
started on the simplest task, just changing the icon with each click.
I just can't get it back to the start. I currently have the three
'change widget icon if state = x' steps first then the add variable 1
and 2 steps then the variable set to 1 if 0 then variable set 2 if 1
then set 0 if >2. Hope that makes sense. Do hey need to be in a
different order?

Pent

unread,
Sep 30, 2010, 7:04:38 AM9/30/10
to Tasker
Try Flashing up the variable value in between each step so you can see
what's
happening to it.

Pent

Duck Redbeard

unread,
Sep 30, 2010, 8:34:24 AM9/30/10
to Tasker
I have no idea what the "flashing up the variable value" means. Can
you further explain? Or better yet, can you add this kind of task to
the profiles or walkthroughs? My goal is to have 3 modes (car, home,
work) where each click changes the state, each state being a different
set of settings. An alternative would be a menu widget with each task
listed, where the main widget on the home screen changes icon/label to
show what state I'm in. Widget toggle state, not United State.

If I could just get a task that does a plain old "set widget label
with each click," total of 3 different labels, it would be great. I
could add all the other stuff like setting the icon and changing sound
settings for each state. I have some practice doing that with the
task "ToggleTask" which is running as 2/3 of what I am after. I just
need to see where to add the third state and how to get it back to the
first.

Chris

unread,
Sep 30, 2010, 9:17:20 AM9/30/10
to Tasker
Hi,

Flashing the variable value means to add a task from the Alert
category called flash, then as text specify %VARIABLE (whatever the
variable is you want)

this will pop up a little message with the value of the variable when
executed. It's good for trouble shooting while creating tasks.

Chris

unread,
Sep 30, 2010, 9:20:16 AM9/30/10
to Tasker
Perhaps the problem is the >2, you should use equals 2 since the
previous task sets it to 2 and you are specifying greater than 2

UncleMike

unread,
Sep 30, 2010, 9:46:37 AM9/30/10
to Tasker
As for cycling through three different variable values, why not just:

Variable Add %VARIABLE 1 [Wrap 3]

This way, 0+1=1, 1+1=2, and 2+1=0.
Reply all
Reply to author
Forward
0 new messages