Hello,
I have a script that should run in different ways depending on the currently-active language. So if the active language is English, it should behave one way, but if it's Hebrew, it should behave in a different way.
Is it possible to detect the language using AHK?
Thanks,
Ram.

Detecting the currently-active language
Started by
cool-RR
, Nov 20 2011 04:44 PM
4 replies to this topic
#1
-
Posted 20 November 2011 - 04:44 PM

Something like this ? However it's the system language and not the keyboard layout, a lot of Windows are in english but have an other language in reality...
msgbox % A_Language ; XX09=english , XX0D=hebrew
#2
-
Posted 20 November 2011 - 05:03 PM

"You annoy me, therefore I exist."
Ah, I guess I meant the keyboard layout. I meant the one that you can change by clicking Alt-Shift.
#3
-
Posted 20 November 2011 - 05:09 PM

Maybe they are other method or language feature to get... But try this
edit: check this link too
<!-- m -->http://www.autohotke...pic.php?t=27029<!-- m -->
<!-- m -->http://www.autohotke...pic.php?t=75148<!-- m -->
#NoEnv ; XX09=english , XX0D=hebrew ; http://msdn.microsoft.com/en-us/library/aa912040 or "Language Codes" of autohotkey.chm F5:: ; method 1 SetFormat, Integer, H msgbox % DllCall("GetKeyboardLayout", Int,DllCall("GetWindowThreadProcessId", int,WinActive("A"), Int,0)) SetFormat, Integer, D ; method 2 VarSetCapacity(kbd, 9) if DllCall("GetKeyboardLayoutName", uint, &kbd) msgbox % kbd Return
edit: check this link too
<!-- m -->http://www.autohotke...pic.php?t=27029<!-- m -->
<!-- m -->http://www.autohotke...pic.php?t=75148<!-- m -->
#4
-
Posted 20 November 2011 - 05:21 PM

"You annoy me, therefore I exist."
Works, thanks!
And thanks also for those 2 links, they were interesting!
And thanks also for those 2 links, they were interesting!
#5
-
Posted 21 November 2011 - 03:03 PM
