Automatic Switching to English Input Language

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Automatic Switching to English Input Language

Post by armsys » Fri Jan 13, 2006 8:51 am

Now I'm greedy. I want to solve the problem which has been troubling me for a long while. Running Macro Scheduler's keyboard commands such as Send> is a big No in the Chinese setting. These character will be interpreted by Windows as Chinese characters. Just imagine the MS script is used to handle system maintenance, including deletion of all temp files. The disaster would be beyond any imagination.

How can a MS script reset English as the default input language regardless of any current setting (Chiense, Korean, Japanese,...)?

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

Post by Marcus Tettmar » Fri Jan 13, 2006 9:45 am

There is quite possibly a more elegant way using VBScript or Win32 API which I haven't found yet, but this simple approach works:

//Set to English (United States)
ExecuteFile>intl.cpl
WaitWindowOpen>Regional and Language Options
SetFocus>Regional and Language Options
Let>SK_DELAY=10
Send>English (United States
Press Enter

And here's a script to set to Chines (Hong Kong S.A.R.):

//Set to Chinese (Hong Kong ...)
ExecuteFile>intl.cpl
WaitWindowOpen>Regional and Language Options
SetFocus>Regional and Language Options
Let>SK_DELAY=10
Send>Chinese (Hong Kong
Press Enter
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Jan 13, 2006 10:30 am

Thank you for your rapid rescue. Thanks for your useful script sample. It's my fault for not elaborating the issue more clearly.

To begin with, Windows XP is designed to be multi-lingual. Your script does set the Stands and Formats, which has nothing to do with the keyboard input in Windows XP in general and Send> in particular in Macro Scheduler.

Nonetheless, inspired by your script, I investigated further and found there's a Key Setting in "Text Services and Input Language" dialog box. There I set "Switch to English" hot key to LeftAlt+Shift+0. The latter can be used in all my MacroScheduler from now on:
Press LALT
Press Shift
Send>0
Release Shift
Release LALT

Following the similar techniques, Macro Scheduler users all over the world including English (becasue UK and US English are different) can easily switch the keyboard layout in no time.

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