How to get the value of between 1-1000 and do not use get text , set text, set to clipboard, get full text

Hi everyone,

i have one problem statement where i need to take two input from user range between 1- 1000 (int) , and use calculator to enter those value and sum those value.

while retrieving the result, i shouldn’t use get text, set text, get full text, set to clipboard.

How to achieve it?

Hi Rakesh, Robot Master. What a funky homework assignment. Are you sure you need help for this?

Ok then, here is one way.

-Use Input Dialog activities to take two inputs from user
-Validate the input (int between 1 and 1000)
-Calculate input1 + input2

Best of luck

Hi @lukasziebold ,

Thanks for the reply.

can you please tell me how to validate the input?(When i tried taking second input as 659, it is not taking).
Also let me know how you will get the result without using the above activity(like get text etc…)?

Yes. Here is very short method.


New Random().Next(1,1000)

each and every time , you will get a different number.


Hi @balupad14 ,

what is the use case is whatever the input you will give it should click on calculator and sum both values and get those values without using any mentioned activity. kindly explain.

No no no, that is not an rpa usecase. Why the hell would you click on the user interface of a calculator?

This is the correct way:

You get the UserInput1 and UserInput2 (string) with Input Dialog activities.
Then you validate like this: UserInput1.IsNumeric AndAlso UserInput2.IsNumeric

And add like this: Result (int32) = Convert.ToInt32(UserInput1) + Convert.ToInt32(UserInput2)


i have been asked in one of the interview to implement this use case.

You should prove to them you know what you are talking about by refusing to do something as stupid as automating the user interface of a calculator and showing a cleaner, faster, more reliable way to automate the same scenario.

Let me try to be even more helpful.
If they insist on this example… You can read the result from the (windows) calculator with a Get Attribut activity. Examine the result element of the calculator with the UiExplorer. You will find an attribute where the result value is included. Use string manipulation if you have to to isolate the integer value.


i have no clue how to implement this, this is totally bouncer for me.

Any help would be appreciated.

Thank you

You should really practice this on your own. Follow the steps above or search individual issues in the forum or the web.