skijve Posted May 17, 2023 Share Posted May 17, 2023 Helo, Keybord does not have character placed in the same place following locale, language,... I would like to simutate a push on certain place whathever the configuration is : On azerty : So : & a é - , and on dutch So : 1 q 2 6 , Is here a way to allow that in autoit ? Thanks a lot ! Link to comment Share on other sites More sharing options...
Danp2 Posted May 17, 2023 Share Posted May 17, 2023 That is a rather strange requirement. Can you share more details behind this need? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Skeletor Posted May 18, 2023 Share Posted May 18, 2023 ControlSend can specify the desired coordinates regardless of the keyboard. Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI Link to comment Share on other sites More sharing options...
skijve Posted May 18, 2023 Author Share Posted May 18, 2023 My probram interract if an ofice soft and require a specific touch to be presst what ever the keybord local is.... For example '&' on french keyboard but '1' on us keyboard (th ekey is at the same position on the keyboard. MANAGING KEYBORD LOCAL SEEMS OMPLICATED... Link to comment Share on other sites More sharing options...
Andreik Posted May 18, 2023 Share Posted May 18, 2023 Probably the easiest way is to maps all your keyboard layouts and use a simple function like that one: Global $aFrenchLayout[$Rows][$Cols] Global $aDutchLayout[$Rows][$Cols] ; Map all your keys $aFrenchLayout[0][1] = '&' ; Key in row 0 and column 1 $aDutchLayout[0][1] = '1' ; Key in row 0 and column 1 Func SendKey($Row, $Col, $Layout) Send($Layout[$Row][$Col]) EndFunc Link to comment Share on other sites More sharing options...
skijve Posted May 19, 2023 Author Share Posted May 19, 2023 yes but it seems that it's difficult to etect the current keyboard layout... im in french-belgium an if I change to DEU (deutch alemand), il continues to give me french belgium : Link to comment Share on other sites More sharing options...
argumentum Posted May 19, 2023 Share Posted May 19, 2023 what about the functions around _WinAPI_GetKeyboardType ($iType) in the help file ?. Maybe those functions may have your answer ?. No clue Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
pixelsearch Posted May 19, 2023 Share Posted May 19, 2023 Maybe the keyboard scan codes would help, as detailed in MS Keyboard Input Overview Link to comment Share on other sites More sharing options...
ioa747 Posted May 20, 2023 Share Posted May 20, 2023 I got out of a similar situation with the function below #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 #include <WinAPISys.au3> sKey("^c") ConsoleWrite(ClipGet() & @CRLF) ;---------------------------------------------------------------------------------------- Func sKey($sKey, $iCnt = 1, $iDelay = 50) ; English (United States) 0x0409, 0x04090409 Local $Lang, $hWnd = WinGetHandle("[ACTIVE]") $Lang = _WinAPI_GetKeyboardLayout($hWnd) If $Lang <> "0x04090409" Then ; if not English then make it _WinAPI_SetKeyboardLayout($hWnd, "0x0409") EndIf For $i = 1 To $iCnt Step 1 Send($sKey) Sleep($iDelay) Next If $Lang <> "0x04090409" Then ; If was others of English set it back _WinAPI_SetKeyboardLayout($hWnd, '0x' & StringRight($Lang, 4)) EndIf EndFunc ;==>sKey ;---------------------------------------------------------------------------------------- more details here: https://www.autoitscript.com/forum/topic/209642 There is also the case: _WinAPI_RegisterHotKey - works with virtual-key codes regardless of keyboard layout Take a look if it helps I know that I know nothing Link to comment Share on other sites More sharing options...
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