How to query user for a variable?

1,922 views
Skip to first unread message

WPWoodJr

unread,
Oct 19, 2010, 10:27:31 AM10/19/10
to Tasker
An earlier post I made seems to have gotten lost.

What is the best way to query a user for a variable value? I tried
"Perform Action Set Variable" but it requires the user to enter the
variable name, it doesn't provide a default value, and there are no
options for slider input, text input, radio buttons, etc.

- Bill

WPWoodJr

unread,
Oct 19, 2010, 9:46:50 AM10/19/10
to Tasker
What is the best way to query the user for a variable? I tried
Perform Action but this requires the user to enter the variable name,
there is no default value, no prompt, and no option for a slider,
radio button, text input field, etc.

WPWoodJr

unread,
Oct 19, 2010, 12:04:20 PM10/19/10
to Tasker
Sorry I meant that I tried "Query Action Set Variable" but it requires
the user to enter the variable name, it doesn't provide a default
value, and there are no options for slider input, text input, radio
buttons, etc.

dbs

unread,
Oct 19, 2010, 1:28:13 PM10/19/10
to Tasker
Context>Variable Value might be what you're looking for.

WPWoodJr

unread,
Oct 19, 2010, 1:47:45 PM10/19/10
to Tasker
I'd like to query the user and put the results of the query into a
variable. For example, I'd like to put up a query something like:

Variable name: %WAIT_TIME
Prompt: Please enter number of minutes to wait
Default value: 15
Timeout: 5 seconds

A simple text box would be great, even better would be options to use
a slider or radio buttons to assist the user with inputting the value.

Where 15 is the default value.

baudi

unread,
Oct 19, 2010, 5:04:47 PM10/19/10
to Tasker
If you are looking for a timer value, you could use the Tasker Timer
widget (Home screen long press/Widgets/Task Timer).

I don't know of a way to make Tasker bring up a dialog for user input,
other than by using SL4A.

dbs

unread,
Oct 19, 2010, 5:06:07 PM10/19/10
to Tasker
I'm stumped.

On Oct 19, 1:47 pm, WPWoodJr <wpwoo...@gmail.com> wrote:

Brandon K

unread,
Oct 19, 2010, 6:48:18 PM10/19/10
to Tasker
I have asked Pent this before and he said there is no way to easily do
this and he has added it to the todo list (hope its high on the list).
He said right now you need to do Tasker > Query Action > Variable Set.
This will pop up a set variable dialogue, but you still have to type
in the variable name.

I can see so many uses for using this feature if it was implemented. I
have been working with creating my own timer as well and being able to
type in a number would be a huge benefit. At the very least it would
be nice to be able to have the variable value pre-filled. This is at
least the third similar thread I have seen regarding this.

Brandon K

unread,
Oct 19, 2010, 7:01:28 PM10/19/10
to Tasker
Whoops looks like I missed that you have tried the Query Action when
scanning the thread. I like your suggestion and hopefully the slider
can be added to the never-ending todo.

ChrisJ

unread,
Oct 19, 2010, 6:57:26 PM10/19/10
to Tasker
can't you use a "menu" choice to chose different tasks, each task
waits a different amount of time? I'm looking into this too but only
had the app 24 hours so still a newb. Want to set my phone to silent
but only for a set amount of time (to save me remembering to turn
silent off again).
Its not as flexible but at least you get the functionality unless you
need exact values rather than multichoice
Chris

WPWoodJr

unread,
Oct 20, 2010, 1:17:28 PM10/20/10
to Tasker
I got an email from Sarvan suggesting:
>May be you can use "Query Action Set Clipboard" and use %CLIP as your
>variable. But there is no timeout option here, the task is paused
>until the user hits cancel/run.

Looks like a good idea until Pent adds the feature. If you need a
slider between 0 - 255 you can use "Query Action Display Brightness"
as long as you set the brightness back ;-)

- Bill

WPWoodJr

unread,
Oct 20, 2010, 1:29:05 PM10/20/10
to Tasker
Menus are ok if there are only a few discrete choices, but tedious to
implement - you need the menu task plus one task for each menu item.

You could optimize your suggestion down to 2 tasks by setting a
variable in each menu item instead of running a task. Then call your
menu task from a parent task, and wait on the value of the variable
becoming non-zero.

Main Task:
Variable Set %WAIT_TIME to 0
Perform Action Menu Task
Wait 1 seconds until %WAIT_TIME > 0
Wait %WAIT_TIME minutes

Menu Task:
Variable Set %WAIT_TIME to 5 Label 5 minutes
Variable Set %WAIT_TIME to 10 Label 10 minutes
Variable Set %WAIT_TIME to 20 Label 20 minutes
etc

dbs

unread,
Oct 20, 2010, 6:56:36 PM10/20/10
to Tasker
I think I understand but why do you need the third line of the main
task about waiting 1 second until the variable is > 0? I'm still
trying to figure out variables. Thanks.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages