Search code examples
windows-7keyboardautoitkeyboard-layout

Autoit SetKeyboardLayout


I've been trying to get this autoit function to work:

_WinAPI_SetKeyboardLayout ( $hWnd, $iLanguage [, $iFlags = 0] )

I was just wondering what the $hWnd argument is supposed to be. In the documentation for this function it says: "Handle to the window to set input locale identifier."

This makes absolutely no sense to me, however I noticed that the second argument, $iLanguage is defined as "The input locale identifier." so They're definitely connected in that way.


Solution

  • The handle or hWnd is just a unique number every window has. You can get the window handle with WinGetHandle("WINNAME")