I am finding that VBscript's SendKeys
does not support Unicode. It supports some like A-65, but not foreign letters like the letter Aleph (א) from the Hebrew alphabet. Prob outside its supported range. Could be for decimal values of 128+, it gives a "?", and it only supports the ASCII range.
I can type and see Hebrew letters on my computer using Windows XP. So the OS support for the characters is there and set up. My source code demonstrates that, since the line
msgbox Chrw(1488)
displays the Aleph character and I've displayed it in Notepad and MS Word.
It looks to me like it is sending a question mark for a character it doesn't recognize. I think MS Word or Notepad if they did have a problem displaying a character (e.g. when the font doesn't support a char), they would display a box rather than a question mark. Certainly in the case of Notepad anyway. So it looks like a SendKeys
issue. Any ideas? Any kind of workaround?
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "notepad" ''#can change to winword
Wscript.Sleep 2000
msgbox Chrw(1488) ''#aleph
objShell.SendKeys ("abc" & ChrW(1488) & "abc") ''#bang, it displays a ? instead of an aleph
WScript.Quit