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

如何选取GUICtrlCreateEdit内的指定内容

[复制链接]
发表于 2009-8-21 11:28:16 | 显示全部楼层 |阅读模式
本帖最后由 病毒专收员 于 2009-8-21 18:30 编辑

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 633, 454, 192, 114)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 625, 449)
GUICtrlSetData(-1, "我要选取那个字呢?")
GUISetState(@SW_SHOW)


While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd


我想选取 ( 取那 ) 这两个字,我该如何操作呢?
发表于 2009-8-21 16:13:51 | 显示全部楼层
[au3]#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiEdit.au3>
$Form1 = GUICreate("Form1", 633, 454, 192, 114)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 625, 449)
GUICtrlSetData(-1, "我要选取那个字呢?")
GUISetState(@SW_SHOW)
_GUICtrlEdit_SetSel($Edit1, 3,5)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd[/au3]
 楼主| 发表于 2009-8-21 18:29:46 | 显示全部楼层
正解,非常感谢.!
[au3]#include
#include
#include
#Include
$Form1 = GUICreate("Form1", 633, 454, 192, 114)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 625, 449)
GUICtrlSetData(-1, "我要选取那个字呢?")
GUISetState(@ ...
大绯狼 发表于 2009-8-21 16:13
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-17 20:05 , Processed in 0.070032 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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