BitLauncher Posted August 9, 2011 Posted August 9, 2011 The script opens a "Save as" dialog and the cursor is at the beginning of the file name textbox: At executing the command Send("C:\Temp\mp3lrc\", 1) ; 1 means raw string ; I would expect, that it writes: C:\Temp\mp3lrc\ ; but it writes: C>Tempmp3lrc I found out, that the key where > ist printed on it writes > in the US english layout, but : in the german swiss layout. There is no key for \ with swiss german layout on that 88 key US-keyboard. Send("zy1+23*45%6&7/8(9)0='?^", 1) ; delivers: zy1!23#45%6^7&8*9(0)[{] ; instead of: zy1+23*45%6&7/8(9)0='?^ The result is 99% US English keyboard layout. But why is z and y not exchanged? Details about system: AutoIt v3.3.6.1, Win 7 Home german. x64 Subnotebook with german keyboard layout Germany with local settings for german Switzerland. With an external 88 keys USB keyboard with US layout (tenlesskey from Filco). 3 different keyboard layouts installed: + german swiss (default) + spanish modern + US english I made a cross check with Notepad and found out - it is depending upon the receiving processes active keyboard layout! ;Run("notepad.exe") WinWaitActive("Unbenannt - Editor") Send("This are all keys from 1 to 0 with alternating shift: 1+2""3*4ç5%6&7/8(9)0= yz", 1); 1 means raw string! ; Results - the first 2 characters refer which keyboard layout was active for ; the Notepad process. ;Es: This are all keys from 1 to 0 with alternating shift: 1!2"3·4$5%6&7/8(9)0= yz ;En: This are all keys from 1 to 0 with alternating shift> 1!2@3#4$5%6^7&8*9(0) yz ;De: This are all keys from 1 to 0 with alternating shift: 1+2"3*4ç5%6&7/8(9)0= yz The question is, why is the keyboard layout 99% so important for the receiving process? I simply want to send a string of ASCII characters - how can I do it? No matter which keyboard layout is active? Keyboard layout does not apply 100% - see y and z, they are always right, but US layout is different to spanish and swiss german!
Blue_Drache Posted August 9, 2011 Posted August 9, 2011 Send("This are all keys from 1 to 0 with alternating shift: 1+2""3*4ç5%6&7/8(9)0= yz", 1); 1 means raw string! Change the quotations surrounding your Send() string to single quotes. That won't fix your issue with the german/us keyboard layout conflict, but it will give you proper output. Send('This are all keys from 1 to 0 with alternating shift: 1+2""3*4ç5%6&7/8(9)0= yz', 1); 1 means raw string! Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
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