How to capture an integer and use it to match a drop down list.

Asked by Pel

I am very new to Sikuli.

What I would like to do is capture a number that is in a text box. Then I would like to use just the first integer of this number to find
a matching category in a drop down list.

Text box [ 934.5 ] <- I want to grab the 934.5.
::Drop Down List::
700 - Bikes
800 - Garbage
900 - Cars <- I want to type "9," the first integer from "934.5," so that the Cars will be highlighted.

Right now I know I can use CLICK to select the drop down list. Then I can TYPE("9"). Can sikuli capture the text box, use the first integer, and type that first integer for me?

If you point me in the right direction, that would be very helpful. Thank you.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

The only way, to get the number from the text box is to use
Region.text()

See docs http://doc.sikuli.org/region.html#region

But be aware: bug 710586

Can you help with this problem?

Provide an answer of your own, or ask Pel for more information if necessary.

To post a message you must log in.