Created
March 21, 2012 15:12
-
-
Save amitu/2148197 to your computer and use it in GitHub Desktop.
autohotkey script to force language to any given language for all apps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
en := DllCall("LoadKeyboardLayout", "Str", "00000409", "Int", 1) | |
Loop | |
{ | |
#IfWinActive | |
{ | |
w := DllCall("GetForegroundWindow") | |
pid := DllCall("GetWindowThreadProcessId", "UInt", w, "Ptr", 0) | |
l := DllCall("GetKeyboardLayout", "UInt", pid) | |
if (l <> en) | |
{ | |
PostMessage 0x50, 0, %en%,, A | |
Sleep 1000 | |
} | |
Sleep 1000 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Language identifiers are available on http://msdn.microsoft.com/en-us/library/dd318693%28v=vs.85%29.aspx.