找回密码
 加入
搜索
查看: 1011|回复: 3

[AU3基础] 重新输入值怎么成了0?

[复制链接]
发表于 2021-9-11 09:47:59 | 显示全部楼层 |阅读模式
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)
$input1 = GUICtrlCreateInput("", 96, 96, 121, 21)
$input2 = GUICtrlCreateInput("", 104, 152, 121, 21)
$Button1 = GUICtrlCreateButton("Button1", 288, 296, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
 
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        $Input1 = GUICtrlRead($Input1)
                        $Input2 = GUICtrlRead($Input2)
                        MsgBox(0, 0, $Input1 & "---" & $Input2)
        EndSwitch
WEnd


发表于 2021-9-11 11:13:03 | 显示全部楼层
老革命碰到新问题?
Case $Button1
        $AInput1 = GUICtrlRead($input1)
        $AInput2 = GUICtrlRead($input2)
        MsgBox(0, 0, $AInput1 & @CRLF & $AInput2)
发表于 2021-9-11 11:17:17 | 显示全部楼层
用这样就直接明了
                Case $Button1
                        MsgBox(0, 0, GUICtrlRead($input1) & @CRLF & GUICtrlRead($input2))

$Input1 = GUICtrlRead($Input1)
 楼主| 发表于 2021-9-11 11:22:55 | 显示全部楼层
哎,不好意思了,各位。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-2 18:10 , Processed in 0.074372 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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