Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
autohotkey script to force language to any given language for all apps
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
}
}
@amitu

This comment has been minimized.

Copy link
Owner Author

@amitu amitu commented Mar 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment