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

controlsend不能正常给控件发送字符串

[复制链接]
发表于 2010-1-31 20:42:48 | 显示全部楼层 |阅读模式
本帖最后由 xndo 于 2010-1-31 21:16 编辑

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 301, 301, 192, 124)
$Edit1 = GUICtrlCreateEdit("", 16, 24, 249, 97)
GUICtrlSetData(-1, "Edit1")
$Input1 = GUICtrlCreateInput("Input1", 48, 144, 233, 21)
$Button1 = GUICtrlCreateButton("Button1", 8, 208, 97, 49)
$Button2 = GUICtrlCreateButton("Button2", 136, 200, 121, 65)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                case $Button1
                        ControlSend($Form1,"",$Edit1,"111")

        EndSwitch
WEnd



点击button1按钮给edit1 发送字符串  不成功。高人指点一下。但是给其他例如QQ聊天窗口控件就成功。  谢谢。

评分

参与人数 1金钱 +10 收起 理由
afan + 10 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

 楼主| 发表于 2010-1-31 20:45:20 | 显示全部楼层
在线等!!!
 楼主| 发表于 2010-1-31 21:15:17 | 显示全部楼层
case $Button1
                        GUICtrlSetData ($Edit1,GUICtrlRead ($Edit1) & "ABC")


已解决
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-30 07:40 , Processed in 0.078397 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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