cu0x Posted August 28, 2015 Posted August 28, 2015 I´m trying to get the Keyboard language and get als return "0" wenn I do it under Windows Server 2012, I executed also in Windows 7 x64 and works fine :SAny suggestion? Appreciate it!Here my code:#include <WinAPISys.au3> Run("cmd.exe", "", @SW_HIDE) Local $hWnd = WinWait("[CLASS:ConsoleWindowClass]") Local $bNewKey = "0" & StringRight(_WinAPI_GetKeyboardLayout($hWnd), 3) MsgBox(0,"Keyboard Language", $bNewKey)
cu0x Posted August 28, 2015 Author Posted August 28, 2015 (edited) I´m trying to get the Keyboard language and get als return "0" wenn I do it under Windows Server 2012, I executed also in Windows 7 x64 and works fine :SAny suggestion? Appreciate it!Here my code:#include <WinAPISys.au3> Run("cmd.exe", "", @SW_HIDE) Local $hWnd = WinWait("[CLASS:ConsoleWindowClass]") Local $bNewKey = "0" & StringRight(_WinAPI_GetKeyboardLayout($hWnd), 3) MsgBox(0,"Keyboard Language", $bNewKey) So I found 1 minute later how to do it #include <WinAPISys.au3> Local $hWnd = _WinAPI_GetDesktopWindow() Local $bNewKey = "0" & StringRight(_WinAPI_GetKeyboardLayout($hWnd), 3) MsgBox(0,"Keyboard Language", $bNewKey) Edited August 28, 2015 by cu0x
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now