找回密码
 加入
搜索
查看: 2321|回复: 2

[AU3基础] ControlGetText获取控件中中英文内容显示乱码

[复制链接]
发表于 2014-6-3 21:52:51 | 显示全部楼层 |阅读模式
ControlGetText获取控件中显示内容为"用于户外运动工具 材质:PP:PD",返回值为乱码,请教如何解决?我使用的版本为3.3.10.2
 楼主| 发表于 2014-6-3 23:04:56 | 显示全部楼层
#include <MsgBoxConstants.au3>
Example()
Func Example()
    Run("notepad.exe")
    Local $hWnd = WinWait("[CLASS:Notepad]", "", 1
    ControlSetText($hWnd, "", "Edit1", "用于户外运动工具 材质:PP:PD")
    Local $sText = ControlGetText($hWnd, "", "Edit1")
    MsgBox($MB_SYSTEMMODAL, "", "The text in Edit1 is: " & $sText)
    WinClose($hWnd)
EndFunc

;其中ControlGetText获取的值变为乱码,改为其它内容都正常
 楼主| 发表于 2014-6-23 18:23:20 | 显示全部楼层
好像是函数本身的Bug
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-10-6 12:41 , Processed in 0.076464 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表