Page 1 of 1
Input Dialog as variable
Posted: 03 Jan 2014 09:17
by rj45
Hi,
Is it possible to make Input Dialog Text value as a variable ? I need to pass the value to other part of the script but I have no idea how to do this.
Re: Input Dialog as variable
Posted: 03 Jan 2014 13:12
by Martin!
According to the help documents, the value from the input dialog is saved to a variable named value, which you can then use elsewhere in your flow.
Re: Input Dialog as variable
Posted: 07 Jan 2014 09:57
by rj45
Thanks now my plugin works.
I've got another question about Input Dialog - is there any way to run the keyboard in numeric mode. I need to input digits in the text field?
Re: Input Dialog as variable
Posted: 07 Jan 2014 12:16
by MURTUMA
That is possible with "enter root command" action and "control ui" action. You'll find the keycodes in the pinned DIY-actions topic above.
Re: Input Dialog as variable
Posted: 07 Jan 2014 14:02
by rj45
Hi,
Thanks for info but I still cannot force Input Dialog to show numeric keyboard
My flow is very simple:
Shortcut
|
|
Input Dialog
|
|
Call Number: 123{value}
Where should I put the root command or control UI - I've tried to put the action execute root command and control UI before and after the Input dialog but nothing happens. The keyboard was selected Automagic Premium as a input method.
Re: Input Dialog as variable
Posted: 07 Jan 2014 20:01
by rj45
I finally managed to force Input Dialog to show numeric keyboard by adding another action to shortcut trigger - Execute root command: input tap (position x) (position y). I checked position by enabling in Developer Options Show Touches and Pointer Location. It is not elegant solution but working - is there any other way to simulate touch of the button "?123" to show numeric keyboard ??
Re: Input Dialog as variable
Posted: 07 Jan 2014 21:47
by MURTUMA
Execute root command
-> input keycode KEYCODE_X (X is directly the number you want to press)
Or if that doesn't work, try this:
Execute root command
-> input keyevent X (these goes from 7 to 16 representing numbers from 0 to 9)
It is device specific if the first method will work, but the second one ALWAYS will.
Re: Input Dialog as variable
Posted: 08 Jan 2014 09:16
by rj45
You misunderstood me - I don't want to enter digits via action - it has to be done manually. When Input Dialog appears it's opens keyboard with letters and I want keyboard with numbers (numpad)
So I was wondering is there any other solution to bring up the numeric keyboard or maybe the Input Dialog should have one more option - Numbers to bring up the numpad.
Re: Input Dialog as variable
Posted: 08 Jan 2014 10:39
by MURTUMA
Sorry, my mistake. I do not know any other way to bring numpad up than changing the text field type to numbers. Maybe you should make a feature request out of that.
I don't really know how this works so this is just a wild guess; if you observe your phone's logs what happens when you press a number field, maybe you can reproduce that event with execute root command or send general broadcast actions?
Re: Input Dialog as variable
Posted: 08 Jan 2014 19:13
by Martin
Hi,
I will add Number and Phone number to the input types in the next update to show the number keyboards.
Regards,
Martin