Jump to content

zipzink

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by zipzink

  1. To send unicode your system should, of course, first be set up to input and display unicode characters. A chinese user named Robie Zhou (robiezhou@gmail.com) has written a user function to send unicode. ;====================================================== ; ; Function Name: _SendUnicode("string") ; Description: Send a unicode or an ASCII string. ; Parameter(s): $string is the string you want to send. ; Requirement(s): String Input. ; Return Value(s): None ; Author(s): Robie Zhou (robiezhou@gmail.com) ; ;====================================================== Func _SendUnicode($string) Local $char Local $code For $i = 1 to StringLen($string) $char = StringMid($string, $i, 1) $code = Asc($char) If $code > 127 Then $code = $code * 256 $i = $i + 1 $char = StringMid($string, $i, 1) $code = $code + Asc($char) EndIf Send("{ASC " & $code & "}") Next EndFunc Save the above script as "Chinese.au3" in the include folder. To test it run the following. #include <Chinese.au3> Run("notepad.exe") WinWaitActive("Untitled - Notepad") _SendUnicode("這是中文") Send("{ENTER}") If this helps you can send a note to Robie Zhou (robiezhou@gmail.com) to thank him.
×
×
  • Create New...