Get Text From WINDOWS 10 Calculator and pasting it into a Data Table. I am Stucked!

excel
uiautomation

#1

Hi everyone, I have a doubt. I need to do some operations using windows 10 calculator and pasting the result into a data table and then pass that DT to and excel sheet. Is important to say that windows 10 calculator has not MENU options, so the only thing i can do is use the Get Text activity into results panel (if u know another options would be great!!)

I was doing it rigt but, in the recording seq, when i get the tex from Calculator Result, it takes the result and some text (“Result display is 0,8” for example)…
So…how can i take this result and extract just the number, i mean to pass this Generic Value variable to a Double??

Thanks for all!


#2

Can you use regex to just only display the numbers?

System.Text.RegularExpressions.Regex.Replace(YOUR VARIABLE HERE, “[^0-9]”,"")

For example?


#3

Hi cotly, thanks for the response. I decided to download the Windows 7 calc to do the thing easier.
Now i can copy using edit menu and clicking copy. Then i get the result and store it in a new variable…but when i want to write the results on excel sheet it appear without comma. For example 6,9 goes to 69 in excel sheet.

Im closer but not solved yet