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

[图形处理] 如何获得Input的值

[复制链接]
发表于 2011-2-9 17:11:09 | 显示全部楼层 |阅读模式
本帖最后由 dhh45 于 2011-2-9 17:15 编辑

以下代码运行后,如何获得Input的值
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 325, 330)
$Combo1 = GUICtrlCreateCombo("Combo1", 48, 16, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Button1 = GUICtrlCreateButton("OK", 160, 384, 129, 33)
GUICtrlSetData($Combo1,"aa|bb","")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Combo1
                        For  $i=0  To  5
                                GUICtrlCreateLabel(GUICtrlRead($Combo1)&$i,50,100+$i*40,50,50)
                                GUICtrlCreateInput(GUICtrlRead($Combo1)&"==>"&$i,100,100+$i*40,50,20)
                                
                        Next
                Case  $Button1
                        
                        ;获得所有Input的值

        EndSwitch
WEnd
发表于 2011-2-9 17:57:30 | 显示全部楼层
本帖最后由 lixiaolong 于 2011-2-9 17:58 编辑

回复 1# dhh45

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 325, 330)
$Combo1 = GUICtrlCreateCombo("Combo1", 48, 16, 145, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
$Button1 = GUICtrlCreateButton("OK", 160, 384, 129, 33)
GUICtrlSetData($Combo1, "aa|bb", "")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Combo1
                        Dim $a[5]
                        For $i = 0 To 4
                                GUICtrlCreateLabel(GUICtrlRead($Combo1) & $i, 50, 100 + $i * 40, 50, 50)
                                $a[$i] = GUICtrlCreateInput(GUICtrlRead($Combo1) & "==>" & $i, 100, 100 + $i * 40, 50, 20)
                        Next
                Case $Button1
                        For $i = 0 To 4
                                MsgBox(0, 0, GUICtrlRead($a[$i]))
                        Next;获得所有Input的值
        EndSwitch
WEnd
 楼主| 发表于 2011-2-10 08:48:50 | 显示全部楼层
嘿嘿,谢谢了啊
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-4 06:57 , Processed in 0.072255 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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