decimal separator problem

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
Enricoys
Junior Coder
Posts: 24
Joined: Mon Jan 06, 2014 1:18 pm

decimal separator problem

Post by Enricoys » Mon Oct 16, 2017 10:27 am

With version 14.4.01 a problem occurred which didn't happen before.
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


User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: decimal separator problem

Post by Marcus Tettmar » Mon Oct 16, 2017 10:33 am

Thanks for letting me know. I have made a note in our bug tracker to investigate and fix.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts