找回密码
 加入
搜索
查看: 6180|回复: 13

[AU3基础] 为什么写入的是数字而不是我输入的? (已解决)

  [复制链接]
发表于 2014-2-27 14:35:03 | 显示全部楼层 |阅读模式
本帖最后由 haopp1 于 2014-3-11 12:44 编辑

求救。 我在第一个对话框输入的admin  第二个对话框 输入的 1234  怎么写到文本中就成了 4——5了 在线等。。。

忘记发代码了
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("登录", 281, 166, 318, 460)
$Group2 = GUICtrlCreateGroup("请输入用户名密码", 5, 19, 269, 135)
GUICtrlSetColor(-1, 0xFF00FF)
$Input1 = GUICtrlCreateInput("", 92, 47, 120, 21)
$Input3 = GUICtrlCreateInput("", 92, 75, 120, 21)
$Label1 = GUICtrlCreateLabel("用户名", 44, 52, 47, 17)
$Label3 = GUICtrlCreateLabel("密码", 44, 80, 39, 17)
$Button1 = GUICtrlCreateButton("写入", 56, 112, 49, 25)
$Button2 = GUICtrlCreateButton("取消", 160, 112, 57, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
        Case $Button1
                        Dl()
            Case $Button2
                        Exit
        EndSwitch
WEnd

GUIDelete()

Func Dl()
IniWrite("C:\config.ini", "","",$Input1&"_"& $Input3)
EndFunc

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2014-2-27 15:15:14 | 显示全部楼层
谢谢已经解决  但是密码怎么让大家看不出来呢
发表于 2014-2-27 15:29:21 | 显示全部楼层
楼主,怎么解决的?可以说一下么?
发表于 2014-2-27 15:35:04 | 显示全部楼层
GUICtrlCreateInput("", x, x, x, x, BitOR($ES_LEFT, $ES_AUTOHSCROLL ,$ES_PASSWORD))

评分

参与人数 1金钱 +10 收起 理由
haopp1 + 10

查看全部评分

 楼主| 发表于 2014-2-27 15:39:59 | 显示全部楼层
回复 3# wilask


    其实少了个捕获控件内如的函数

$read1=GUICtrlRead($Input1)
$read3=GUICtrlRead($Input3)
就这样
 楼主| 发表于 2014-2-27 15:40:11 | 显示全部楼层
回复 4# afan


    谢谢。。。。。。
发表于 2014-2-27 22:56:33 | 显示全部楼层
几天不上论坛,你们都学这个了?
发表于 2014-2-28 09:13:27 | 显示全部楼层
学习下。谢谢分享。
 楼主| 发表于 2014-2-28 10:10:26 | 显示全部楼层
回复 7# hzxymkb


    貌似这个很复杂的。。。
 楼主| 发表于 2014-2-28 10:10:43 | 显示全部楼层
回复 8# chenking84


    不客气互相帮忙么
发表于 2014-2-28 11:25:07 | 显示全部楼层
回复 5# haopp1


    明白了,谢谢!
 楼主| 发表于 2014-3-3 09:36:46 | 显示全部楼层
回复 11# wilask


    不客气的
发表于 2014-3-5 11:08:56 | 显示全部楼层
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("登录", 281, 166, 318, 460)
$Group2 = GUICtrlCreateGroup("请输入用户名密码", 5, 19, 269, 135)
GUICtrlSetColor(-1, 0xFF00FF)
$Input1 = GUICtrlCreateInput("", 92, 47, 120, 21)
$Input3 = GUICtrlCreateInput("", 92, 75, 120, 21)
$Label1 = GUICtrlCreateLabel("用户名", 44, 52, 47, 17)
$Label3 = GUICtrlCreateLabel("密码", 44, 80, 39, 17)
$Button1 = GUICtrlCreateButton("写入", 56, 112, 49, 25)
$Button2 = GUICtrlCreateButton("取消", 160, 112, 57, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        Dl()
                Case $Button2
                        Exit
        EndSwitch
WEnd

GUIDelete()

Func Dl()
        IniWrite("C:\config.ini", "", "", GUICtrlRead($Input1) & "_" & GUICtrlRead($Input3))
EndFunc   ;==>Dl
发表于 2014-3-6 13:30:10 | 显示全部楼层
好久没来了....再来温故一下.....再不来都快忘记这些代码了......学习ing
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-19 07:03 , Processed in 0.092065 second(s), 29 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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