菜鸟求高手解答GUICtrlCreateListView问题
本帖最后由 小凯 于 2010-5-21 20:32 编辑很简单的一个小程序,我能做到这里已经很不容易了,希望能给解答
问题就在于我点击通过之后,系统方式那一条要求显示系统注册,我不知道该怎么写,望高手解答!!!#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\documents and settings\administrator\桌面\ce.kxf
$Form1_1 = GUICreate("Form1", 621, 198, 192, 114)
$Input1 = GUICtrlCreateInput("帐号", 16, 24, 121, 21)
$Input2 = GUICtrlCreateInput("", 17, 53, 121, 21)
$ListView2 = GUICtrlCreateListView("帐号|密码|系统方式", 384, 24, 225, 137)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 80)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 75)
$Button1 = GUICtrlCreateButton("提交", 64, 96, 57, 33)
$ListView1 = GUICtrlCreateListView("帐号|密码", 144, 24, 177, 137)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 70)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 100)
$Button2 = GUICtrlCreateButton("通过→", 328, 72, 49, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$a = GUICtrlRead($Input1)
$b = GUICtrlRead($Input2)
GUICtrlCreateListViewItem($a & "|" & $b,$ListView1)
Case $Button2
GUICtrlCreateListViewItem(GUICtrlRead(GUICtrlRead($ListView1) & "|系统注册" ),$ListView2)
EndSwitch
WEnd
#include <GuiListView.au3>
#include <WindowsConstants.au3>
$Form1_1 = GUICreate("Form1", 621, 198, 192, 114)
$Input1 = GUICtrlCreateInput("帐号", 16, 24, 121, 21)
$Input2 = GUICtrlCreateInput("", 17, 53, 121, 21)
$ListView2 = GUICtrlCreateListView("帐号|密码|系统方式", 384, 24, 225, 137)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 80)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 75)
$Button1 = GUICtrlCreateButton("提交", 64, 96, 57, 33)
$ListView1 = GUICtrlCreateListView("帐号|密码", 144, 24, 177, 137)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 70)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 100)
$Button2 = GUICtrlCreateButton("通过→", 328, 72, 49, 33)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case - 3
Exit
Case $Button1
$a = GUICtrlRead($Input1)
$b = GUICtrlRead($Input2)
GUICtrlCreateListViewItem($a & "|" & $b, $ListView1)
Case $Button2
$aItem = _GUICtrlListView_GetSelectedIndices($ListView1, True)
If UBound($aItem) > 1 Then
$sText = _GUICtrlListView_GetItemTextString($ListView1, $aItem)
GUICtrlCreateListViewItem($sText & '|' & '系统注册', $ListView2)
EndIf
EndSwitch
WEnd 回复 2# 水木子
再请教个问题!!
帐号密码通过的时候,帐号保留密码自动更改为“密码已隐藏”该怎么写,借用一下这个程序问下。
具体是
帐号 密码允许通过帐号 密码已隐藏系统注册
望解答!!!!!!!!!!!!
不胜感激:face (37): 将上面我给的代码 第25行 改成$b = StringRegExpReplace(GUICtrlRead($Input2), '.', '*') 回复 4# 水木子
大哥!我表达失误..
Case $Button2
$aItem = _GUICtrlListView_GetSelectedIndices($ListView1, True)
If UBound($aItem) > 1 Then
$sText = _GUICtrlListView_GetItemTextString($ListView1, $aItem)
GUICtrlCreateListViewItem($sText & '|' & '系统注册', $ListView2)
我的意思是在$ListView2 这行里 更改为“密码已隐藏” 是这样吗?#include <GuiListView.au3>
#include <WindowsConstants.au3>
$Form1_1 = GUICreate("Form1", 621, 198, 192, 114)
$Input1 = GUICtrlCreateInput("帐号", 16, 24, 121, 21)
$Input2 = GUICtrlCreateInput("", 17, 53, 121, 21)
$ListView2 = GUICtrlCreateListView("帐号|密码|系统方式", 384, 24, 225, 137)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 80)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 75)
$Button1 = GUICtrlCreateButton("提交", 64, 96, 57, 33)
$ListView1 = GUICtrlCreateListView("帐号|密码", 144, 24, 177, 137)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 70)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 100)
$Button2 = GUICtrlCreateButton("通过→", 328, 72, 49, 33)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case - 3
Exit
Case $Button1
$a = GUICtrlRead($Input1)
$b = GUICtrlRead($Input2)
GUICtrlCreateListViewItem($a & "|" & $b, $ListView1)
Case $Button2
$aItem = _GUICtrlListView_GetSelectedIndices($ListView1, True)
If UBound($aItem) > 1 Then
$sText = _GUICtrlListView_GetItemText($ListView1, $aItem, 0)
GUICtrlCreateListViewItem($sText & '|密码已隐藏|' & '系统注册', $ListView2)
EndIf
EndSwitch
WEnd 谢谢!!达到我的想法了,.谢谢!! 我看帮助看了几个小时了,试验了N次,都没达到这效果!
亏就亏咱不懂英语啊!哎!!! 本帖最后由 水木子 于 2010-5-21 20:51 编辑
回复 7# 小凯
老实说我也不懂E文 ^_^ 回复 7# 小凯
来这里下载中文的UDF帮助
http://autoitx.com/forum.php?mod=viewthread&tid=7404&highlight=api
下载完之后,给第一个文件名修改为autoit3udf.7z.001,第二个改为改名为autoit3udf.7z.002,然后下个7zip解压缩工具, 地址在这里:http://sparanoid.com/lab/7z/
然后,在autoit3udf.7z.001上点右键,选7-zip,Extract Here,解压出来就是汉化版的UDF了,看起来就不吃力了。 回复 9# lanfengc
谢谢了!!收藏了
页:
[1]