Jump to content

Adding a input language


Recommended Posts

Hello every body,

i am writing an application and one of its functions should add an inputting device. lets say, you have english installed, and the application will add French to the system.

I tried some registry tweaks and it worked, but i should restart to get in service, unlike if i do it manually through the

intl.cpl, language, details, add new keyboard. If i make it manually i can see the language bar automatically, but if i make it from the registry i must restart and i dont see the language bar.

Can any body help me, to invoke the intl.cpl to add a keyboard and the lang bar.

thanks

Sheriff

Edited by Sheriff
Link to comment
Share on other sites


Hello every body,

i am writing an application and one of its functions should add an inputting device. lets say, you have english installed, and the application will add French to the system.

I tried some registry tweaks and it worked, but i should restart to get in service, unlike if i do it manually through the

intl.cpl, language, details, add new keyboard. If i make it manually i can see the language bar automatically, but if i make it from the registry i must restart and i dont see the language bar.

Can any body help me, to invoke the intl.cpl to add a keyboard and the lang bar.

thanks

Sheriff

Vbs script to do what you want.

Save As Intl.vbs

 CreateObject("Wscript.Shell").Run("intl.cpl")

Cmd Promt to do what you want

Save As Intl.cmd

Echo Off 
Color F3
Mode 55,5
Start intl.cpl

Link to comment
Share on other sites

Thank you alot, it really worked although i dont understand what did it do.

The last problem is that the intl.cpl is opened and i have to close it manually, is it possible to close it also with the script?

Thanks for your help

Link to comment
Share on other sites

Thank you alot, it really worked although i dont understand what did it do.

The last problem is that the intl.cpl is opened and i have to close it manually, is it possible to close it also with the script?

Thanks for your help

Yes it is possible

VBS Script

Intl_OpenClose.vbs

 Dim Act : Set Act = CreateObject("Wscript.Shell")
Act.Run("intl.cpl")
/'-> Wait Period Time I minute
Wscript.Sleep 60000
Act.Run("taskkill.exe /F /Im intl.cpl"),0,true

Cmd Promt

Intl_OpenClose.cmd

@Echo Off
Color F3
Mode 55,5
Start intl.cpl
Echo Waiting For One Minute Before Closing Intl.cpl
ping -n 60 127.0.0.1>nul
taskkill.exe /F /Im intl.cpl

Link to comment
Share on other sites

Hello,

Thank you for your previous reply. I am facing a strange problem that cause the script some times to work and some times not. I tested it now but it didn't work,i checked the Language Bar setting, but the check boxes are all disabled, although the settings in the registry are correct.

I enable the lang bar using this code

[HKEY_CURRENT_USER\Software\Microsoft\CTF\LangBar]

"ShowStatus"=dword:00000004

"Transparency"=dword:000000ff

"Label"=dword:00000001

"ExtraIconsOnMinimized"=dword:00000000

I tried unregistering then registering msutb.dll, but no change :(

any advice?

Thanks in advance,

Sheriff

Edited by Sheriff
Link to comment
Share on other sites

Hello Gunsomkingsman,

I found the mistake. The code you wrote was wonderful, but there was one mistake in closing the intl.cpl window. The used concept was waiting 1 min to close it using the taskmanager, but it should close it by stimulating 4 times tab key then 1 time enter key.

Stimulating a keypress is simple in vb using sendkeys, but how to do it in vbscript, should be that way

Dim Act : Set Act = CreateObject("Wscript.Shell")

Act.Run("intl.cpl")

/'-> Wait Period Time I minute

Act.SendKeys "{TAB}"

Act.SendKeys "{TAB}"

Act.SendKeys "{TAB}"

Act.SendKeys "{TAB}"

Act.SendKeys "{ENTER}"

and the other cmd file

@Echo Off

Color F3

Mode 55,5

Start intl.cpl

Echo Waiting For One Minute Before Closing Intl.cpl

Edited by Sheriff
Link to comment
Share on other sites

I need somebody to help me with this vbs, here i am running the regional setting and then the program wait 7 sec then click tab 4 times then enter.

I want the program not to wait 7 sec, but to wait till the regional setting runs (Do while loop) but how?

Dim WshShell

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run "control.exe intl.cpl,SW_SHOWNORMAL,False"

WScript.Sleep(7000)

WshShell.SendKeys ("{tab}")

WshShell.SendKeys ("{tab}")

WshShell.SendKeys ("{tab}")

WshShell.SendKeys ("{tab}")

WshShell.SendKeys ("{enter}")

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...