• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Enter username and password

I have an app on my cell phone when I open it I want Tasker to insert username and password I have no idea how to accomplish this any tips thanks
Rick
 
Last edited:
Ok I figured most of it out
Im stuck on the shell command
This is what I have
Input tap 66 550 (this is the location of where my password is to be typed)
input keyevent 45 36 38 35

This will type all the letters but how do I get say the 45 in upper case
Thanks
 
Ok I figured most of it out
Im stuck on the shell command
This is what I have
Input tap 66 550 (this is the location of where my password is to be typed)
input keyevent 45 36 38 35

This will type all the letters but how do I get say the 45 in upper case
Thanks

Bearing in mind that I have pretty-much zero knowledge about Tasker :)), it looks like you simply need to preface the 45 keyevent with a shift keyevent (KEYCODE_SHIFT_LEFT or KEYCODE_SHIFT_RIGHT).

[note sure how long the shift is in-effect for...one char or many? IDK..]

See these very helpful pages for more information and options:


Cheers!
 
Thanks for the reply
I cant figure it out
I tried your keycode_shift_left and right
I dont think im using it right
I type in
input keyevent 42
KEYCODE_SHIFT_LEFT input keyevent 42 (this should have typed in a capital N)
this does not work
I tried a couple of combinations
any ideas
Thanks
 
I don't know if you can specify multiple keys on one keyevent line, but did you try doing the shift (either KEYCODE_SHIFT_LEFT or KEYCODE_SHIFT_RIGHT) before the character you want to upshift?

I.e., either:

input keyevent KEYCODE_SHIFT_LEFT 42

or

input keyevent KEYCODE_SHIFT_LEFT
input keyevent 42

That's what I'd try...
 
Hmm,...bearing in mind that I still don't know very much about Tasker, can you create a variable / literal and "send" / paste that instead of individual keys?

I.e., do the string all at once instead of one at a time...
 
It turns out that Tasker must be using the stock/standard /system/bin/input script.

I found the source for the com.android.commands.input.Input class and it reveals several behaviors that I'm betting Tasker implements:

Usage: input [<source>] <command> [<arg>...]

The sources are:
mouse
keyboard
joystick
touchnavigation
touchpad
trackball
stylus
dpad
touchscreen
gamepad

The commands and default sources are:
text <string> (Default: touchscreen)
keyevent [--longpress] <key code number or name> ... (Default: keyboard)
tap <x> <y> (Default: touchscreen)
swipe <x1> <y1> <x2> <y2> [duration(ms)] (Default: touchscreen)
press (Default: trackball)
roll <dx> <dy> (Default: trackball)

Hope that helps!

Edit and by the way: you can actually do/test the above right from a shell prompt on your device (i.e., with either an adb shell or an Android Terminal Emulator shell):

If you have your phone / device with an input / text field open (i.e., ready for typing), you can do this:

shell@hammerhead:/ $ input text ThisIsMyPassword
input text ThisIsMyPassword
shell@hammerhead:/ $
and "ThisIsMyPassword" will show up in input text field on your device.

Pretty neat!
 
Back
Top Bottom