Input Dialog focus

studio
p_known
inputbox

#1

Hi everyone,
I have 2 “Input dialog”.
After I write some text in “Input dialog 1” and click “OK”. Next, “Input dialog 2” showing but not focus in textbox.

Help me focus textbox in “Input dialog 2” after click “OK” in “Input dialog 1”.

Thank,
Henry


#2

I just tried here and it is working fine (it focus on the second dialog as well).

Post more details about how you are doing it.


#3

Hi Mateus_Cruz,
In “Input dialog 2” I checked in IsPassword checkbox.


#4

Ah, I understand.
Yes, currently the focus isn’t automatic when you use IsPassword.
This will probably change in a future version, but, for now, a workaround can be done using the Parallel activity combining the Input dialog activity and a Set focus activity.InputDialogPasswordTest.xaml (5.2 KB)


#5

Thank Mateus_Cruz,
I trying using “Set Focus” and try my way : Using “Send HotKey” - Tab.
But the focus isn’t automatic.

If you have other way or detail demo this, please talk to me.
Thank you very much Mateus_Cruz!


#6

I attached a sample workflow to my last reply.

Check the selector used in the Set Focus activity and you’ll see that it has a 'idx=2'.
To understand why there’s that 'idx=2' in the selector, open the UiExplorer and inspect the input dialog. You’ll see there’re two “editable text” elements; the first one has the aastate as invisible, offscreen, and the second one has aastate as focusable, protected. The one that you want to focus is the second one.

I didn’t try using the Send Hotkey activity, but I think you’d need two Send HotKey activities, so the Set Focus method looks simpler.

In any case, check the selectors!


#8

Thank Mateus_Cruz,
But I don’t "Indicate of screen " in “Set Focus” when Run Automation.
And I have a question: I can have 2 textbox in 1 “Input Dialog”.
If have 2 textbox will solves this problem.
Once again, thank you very much!


#9

You don’t need to use “Indicate on screen” from the activity, just copy the selector string from UiExplorer and paste it on the selector of the activity.
Did you try running the sample I attached? Did it work?

About your question, as far as I know, there’s no direct way to have two textboxes in a single dialog. For some workarounds and discussion about this, visit Create multiple field input dialog


#10

Thank Mateus_Cruz,
I running the sample you attached.
Once again, thank you very much!