leonidnei Posted December 19, 2006 Share Posted December 19, 2006 I expected send("a") to send letter 'a', but it sends a keystroke which depends on input locale, so if the current locale is not English, the result can be different. send("{ASC 097}") always sends 'a'. Obviously it is not practical to send text in hex format, so is there a way to send text which will be the same with any input locale? Link to comment Share on other sites More sharing options...
FreeFry Posted December 21, 2006 Share Posted December 21, 2006 (edited) Actually, it's not hex, it's decimal ascii code, and i guess you could do something like this. Dim $Sentence = "Test sentence" For $i = 1 To StringLen($Sentence) $char = StringLeft($Sentence, 1) $Sentence = StringTrimLeft($Sentence, 1) Send("{ASC " & Asc($char) & "}") Next Edited December 21, 2006 by FreeFry Link to comment Share on other sites More sharing options...
leonidnei Posted December 24, 2006 Author Share Posted December 24, 2006 Probably this will work, but it looks so ugly! I cannot believe there is no way to send plain text just as Wscript SendKeys does (http://www.devguru.com/Technologies/wsh/quickref/wshshell_SendKeys.html) 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