Jfish Posted August 26, 2015 Posted August 26, 2015 @Adele - my code did not launch the command line window. It assumes the command line window is already open.Try this instead:Func _WinAPI_GetKeyboardLayout2($hWnd) Local $hDLL = DllOpen("user32.dll") Local $aRet = DllCall('user32.dll', 'DWORD', 'GetWindowThreadProcessId', 'hwnd', $hWnd, 'ptr', 0) $aRet = DllCall('user32.dll', 'handle', 'GetKeyboardLayout', 'DWORD', $aRet[0]) DllClose($hDLL) Return $aRet[0] EndFunc ;==>_WinAPI_GetKeyboardLayout run("cmd.exe") sleep(1000) $parentPID=run("conhost.exe") $key=_WinAPI_GetKeyboardLayout2($parentPID) MsgBox(0,"",$key) Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt
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