Edit string variable from Get Text OCR activity and Copy Selected activity

I have another problem. I want to read a number from a field in the program. I use two options.

First. Get Text OCR, the retrieved value is correct (for example “11 432,98”), I can edit it and remove blank space and other characters from it by the command - variable.Replace(" “,” “).Replace (”, ", ‘’)

Second. Double click on a field in the program and use Copy Selected Text activity. Then I check the value retrieved by the Write Line activity and looks the same as the first option, but with this method as I will use the command variable.Replace(" “,” “).Replace (”, ", ‘’) the character “,” is removed, but blank space remains and the program returns the error “Assign: Input string was not in a correct format.”

I was compare the variables of two methods by IF activity, I get information that they are not identical! Why is this happening? :frowning:
I have to use the Copy Selected option :frowning:

HI @krzysztof.stanjek

By looking at the command you have written here, I see that you are replacing the space with another space again…

However, replacing the character “,” is correct…

Can you try this command…


This gives the proper output for me

1 Like

variable.Replace(" “,”“).Replace(”,“,”") - I used it, by the first time I pasted wrong command (I use google translator to write here and translator change my command :slight_smile: )

Did it work for you?

No. You don’t understand me. Try get text with “blank space” by Get Text OCR and Copy Selected. Next try delete “blank space”. Variable from Get Text OCR you will can edit and delete blank space but in variable from Copy Selected not. Try it.

1 Like