Page 1 of 1
Webpage box enter
Posted: 15 Jan 2015 01:08
by Theowi
How do i get automagic to insert a text into an empty text-box on a webpage? Pls assist
I uploaded an image
Re: Webpage box enter
Posted: 16 Jan 2015 11:15
by Martin
Hi,
Many browsers don't provide the required accessibility information to detect the input fields and to enter text so you could try to send keyboard input to the browser with action
Control UI and function
sendText or function
sendKey.
Depending on browser you could also fill out a form with a
Javascript Bookmarklet.
You could also resort to action
Execute Root Command with commands
input tap x y to simulate touch input or
input text xyz (not supported on all ROMs).
Regards,
Martin
Re: Webpage box enter
Posted: 23 Jan 2015 00:08
by Theowi
Could you pls write me a flow.... i will self get the x,y location... when i tried the Sendtext it didnt work because i couldn't get it to go to that box location... i even tried the overlay option....
Re: Webpage box enter
Posted: 23 Jan 2015 09:18
by Martin
Clicking on a x,y location in a browser will most likely not work.
You can use sendKey to navigate between fields, for example like this:
-action
Control UI with script:
Code: Select all
sendKey("TAB");
sleep(500);
sendText("My Name");
The first line moves input focus to the next field. On chrome it moved the input focus to the first field when no field was focused before.
The second line waits half a second since it might take the browser a short amount of time to properly execute the first line (depending on browser this line might not be required).
The third line enters 'My Name' into the field that has focus.
Note that the input method of Automagic has to be enabled and active to execute the above script.
Re: Webpage box enter
Posted: 26 Jan 2015 10:09
by Theowi
Thanx.... Alot Martin it works now.... Will ask for your assistance again when I have a problem....
Re: Webpage box enter
Posted: 23 Jun 2016 16:25
by dragon
Hey guys, I have a question about inserting text into a field.
Suppose I open an app, and the cursor is already set in the password field of the app.
I want Automagic to type in my password for me and open up the app. (the app requires me to input password for entry)
So my flow triggers when the app opens,
then if I make an action to Control UI...
sleep(100);
sendText(".....");
sleep(100);
... I get an error that Automagic input method is not selected. Am I to conclude that I have to set Automagic input to send text to a field/element?
I can get it to work if I add Automagic input method before the action, and then change input method back to swiftkey after action but I feel like this might be not necessary. Is there not a way to send text to a field without invoking Automagic input method?
Re: Webpage box enter
Posted: 24 Jun 2016 19:22
by Martin
Hi,
The Automagic input method is required to simulate keyboard input. You could try to use function paste to insert text into the field. Unfortunately the current version of Automagic requires to define the coordinates of the component to paste the text. The next update will also provide functions to set the text in the currently focused component.
On a rooted device you could also use Execute Root Command: input text xyz to simulate typing text.
Regards,
Martin