所以,目前我基本上是使用发送到窗口资源管理器的 Ctrl+C 复制文件夹的名称。被复制的文本通常充满了 Unicode 字符。然后,我像这样使用
ClipGet()
:
$data = ClipGet()
Send($data)
不幸的是,
ClipGet()
命令不适用于 Unicode,因此我没有发送正确的文件夹标题,而是收到一堆 ?
字符。我真的不确定我应该怎么做才能Send()
填充Unicode字符的正确文本。
Clip get 完美运行。 Send() 是问题所在。
来自论坛
;======================================================
;
; 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 ([email protected])
;
;======================================================
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
请将完整的脚本与 ClipGet() 和 Send 一起发送到这里
或者它只是在...之前输入 $string fith clip 吗?
$字符串= ClipGet()
我怎么称呼函数?