Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Magrão

macrumors newbie
Original poster
Mar 4, 2011
11
0
UK
I have a particular problem because of a bug in Excel for Mac 2011 in Yosemite. I have discovered a workaround: by changing the Region setting, in SystemPreferences/Language & Region, to a non-GMT locale, the bug no longer occurs. For instance, if I change Region from United Kingdom, to Italy, the bug doesn't occur.

I've been developing a macro that runs an AppleScript, that in turn runs a shell script, to change the setting using the defaults utility. The shell script I'm using is this:
Code:
defaults write NSGlobalDomain AppleLocale en_GB
The intention being that on opening Excel, the application changes the value of AppleLocale, the bug is zapped and then, on closing, it changes AppleLocale back to what it as previously.

Changing the setting of AppleLocale programmatically on opening Excel works fine. But Excel only recognises this change if I then restart it. However, if I make the change using the System Preferences GUI, then I don't need to restart Excel for it to recognise the change.

I really want to avoid GUI Scripting, so I'm wondering if some clever bod out there might know why this scripted change isn't recognised. Do I need to do something else to force Excel to recognise the change?

Thanks for any help... :)
 
MOD NOTE: You're more likely to find an answer here in the programming section, so I moved your thread.

B
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.