Hello,
This code:
Let>Source=58,45
Let>Find=,
StringReplace>%Source%,%Find%,.,x
MessageModal>%x%
let>x=x+1
MessageModal>%x%
works ok and give as result: 59,45
but when i get the source from a cell in excel, with this code:
Press CTRL
Send>c
Release CTRL
Wait>0.10
GetClipBoard>r
Let>Source=r
Let>Find=,
StringReplace>%Source%,%Find%,.,x
MessageModal>%x%
let>x=x+1
MessageModal>%x%
the result is: x+1
Thanks for your help
Get number from clipboard and make calculation
Moderators: Dorian (MJT support), JRL
When you copy data from excel to the clipboard the data comes with a carriage return and line feed character attached. You need to strip those out from the value of the variable before you use teh variable.
Try this:
Try this:
Code: Select all
Press CTRL
Send>c
Release CTRL
Wait>0.10
GetClipBoard>r
StringReplace>r,%crlf%,,r
Let>Source=r
Let>Find=,
StringReplace>%Source%,%Find%,.,x
MessageModal>%x%
let>x=x+1
MessageModal>%x%