leonidnei Posted December 19, 2006 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?
FreeFry Posted December 21, 2006 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
leonidnei Posted December 24, 2006 Author 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)
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