adamgal Posted April 18, 2005 Posted April 18, 2005 I am trying to use dllcall to get the current keyboard layout, but for some reason it always returns english (0409) this is the code:$user32dll = DllOpen("user32.dll") $x = DllCall($user32dll,"long","GetKeyboardLayout","int",0) MsgBox(0,"",hex($x[0],4)) DllClose($user32dll)what I thought was maybe this, the parameter I am supposed to give is a thread identifier or 0 for the current thread,anyone have any thoughts about this?Link to MSDN - GetKeyboardLayout
zeroZshadow Posted April 18, 2005 Posted April 18, 2005 why do you open it?? just remove that line $x = DllCall($user32dll,"long","GetKeyboardLayout","int",0) MsgBox(0,"",hex($x[0],4)) *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
adamgal Posted April 18, 2005 Author Posted April 18, 2005 that doesn't make any difference, I tried it without opening too
Developers Jos Posted April 18, 2005 Developers Posted April 18, 2005 that doesn't make any difference, I tried it without opening too<{POST_SNAPBACK}>Works fine here....I believe it returns the Default keyboard layout...returns 0409 when i set the default keyboard to US Englishreturns 0413 when i set the default to Dutch SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
adamgal Posted April 18, 2005 Author Posted April 18, 2005 Works fine here....I believe it returns the Default keyboard layout...returns 0409 when i set the default keyboard to US Englishreturns 0413 when i set the default to Dutch<{POST_SNAPBACK}>oh, well, you know any way to get the current input language, not the default one?cause the default language is a static thing and what I need is to know in what language the user is currently typing.thanks anyway
Developers Jos Posted April 18, 2005 Developers Posted April 18, 2005 oh, well, you know any way to get the current input language, not the default one?cause the default language is a static thing and what I need is to know in what language the user is currently typing.thanks anyway<{POST_SNAPBACK}>But isn't the issue that a new process is shelled which will use the Default language settings ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
adamgal Posted April 18, 2005 Author Posted April 18, 2005 But isn't the issue that a new process is shelled which will use the Default language settings ?<{POST_SNAPBACK}>yeah, youre right, but how do I get the thread ID of a different process to give to GetKeyboardLayout ?
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