Jump to content

Recommended Posts

Posted

;===============================================================================
;
; Function Name:    _UniSend("string")
; Description:    Sends a string with unicode characters by internally
;           replacing unicode characters with {ASC UNICODEcode}
; Parameter(s):  $uniString - The unicode string.
; Requirement(s):   String Input.
; Return Value(s):  none
; Author:       Praveen Shirali (HydroXidE)
;
;===============================================================================

Func _UniSend($uniString)
    Local $i
    For $i = 1 to StringLen($uniString)
        If AscW(StringMid($uniString,$i,1)) > 255 Then
            $uniString = StringLeft($uniString, $i-1) & "{ASC " & AscW(StringMid($uniString, $i, 1)) & "}" & StringMid($uniString, $i+1)
        EndIf
    Next
    Send($uniString)    
EndFunc  ;==>_UniSend

; *** EXAMPLE ***
$myString = "There's some unicode here --> " & ChrW(8362) & " <--"

Run("write.exe")
WinWaitActive("Document - WordPad")

Send($myString)
Send("{ENTER}")
_UniSend($myString)

Simple function. Have fun.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...