My default decimal separator on my Windows 7 system is a comma because I run it with the Dutch language version. To make calculations possible in MS I always start a script with those two lines:
Let>DECIMAL_SEPARATOR=.
Let>THOUSAND_SEPARATOR=,
This worked fine until version 14.4.01. Under certain circumstances the decimal separator is changed back to the system default (comma). After that point MS calculations with a non rounded figure won't work anymore.
It seems to happen as soon as the 'WindowAction' is used. And only if 'SetFocus' is used before.
I indeed can solve this by including again both separtor settings after 'WindowAction', however I don't think this is the way to make it work. I think this is a small, but uncomfortable, bug.
I included a test script to show the problem.
Code: Select all
Let>DECIMAL_SEPARATOR=.
Let>THOUSAND_SEPARATOR=,
GetTextInit
//Let>screenheight=1080
//Let>calc={0.83*%screenheight%}
//MessageModal>1: %calc%
IECreate>IE[1]
Wait>1
IENavigate>%IE[1]%,https://google.com/,ie_res
IEWaitDocumentComplete>%IE[1]%,ie_res
Let>calc={0.83*1080}
MessageModal>1: %calc%
//Output to screen written with dot as decimal separator
SetFocus>Google*
WindowAction>1,Google*
Let>calc={0.83*1080}
MessageModal>2: %calc%
//Output to screen written with comma as decimal separator