Regional settings decimal character causing issues

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
mafiamoe
Junior Coder
Posts: 38
Joined: Thu Jul 06, 2006 8:28 am

Regional settings decimal character causing issues

Post by mafiamoe » Fri May 08, 2009 10:46 am

Did a quick search before posting, and it looks like you have already dealt with some issue regarding this. Didn't see any post about this issue specifically.

When creating a macro using windows regional settings that uses a '.' as the decimal character, but running on a computer with regional settings that uses a ',' as the decimal character, errors crop up all over the place if the code uses any variable with a decimal.

The current fix is to change the windows regional settings of course, but would be nice to not have to.

Thank you in advance.

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Have script samples?

Post by gdyvig » Fri May 08, 2009 4:13 pm

Hi mafiamoe ,



As you know, the problem with commas in variable values is that Macro Scheduler commands use the comma as a delimiter. Sounds like you already read some solutions for specific situations, but none that worked well for your particular situation.

I did a few tests where variable values contained commas. No problem with GoSub params, Position, or MidStr commands for VAREXPLICIT 0 or 1. Possibly other commands don't handle commas as well and need to be fixed, could you provide some script samples showing how you obtained the date/time values and where you ran into trouble?

If you are writing date/time values out to a file and trying to capture them into variables I can see where you would have problems. Especially for csv files. Search RegEx and csv and quotes for some possible solutions involving columns containing embedded commas.


Gale

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