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

[AU3基础] 请教关于GUICtrlListBox列表框数据读取后为正行的方法

[复制链接]
发表于 2024-2-27 21:27:07 | 显示全部楼层 |阅读模式



Case $Button7
                        If _IsChecked($Checkbox1) Then $File1 = " /min:" & GUICtrlRead($Input5)
                        If _IsChecked($Checkbox2) Then $File2 = " /max:" & GUICtrlRead($Input6)
;~                         $Roboload = @SystemDir & "\Robocopy.exe" & " " & Chr(34) & GUICtrlRead($Input1) & Chr(34) & " " & Chr(34) & GUICtrlRead($Input2) & Chr(34) & " /S /mir " & _
;~                                         $File1 & $File2 & "/R:" & GUICtrlRead($Input3) & " /W:" & GUICtrlRead($Input4) & " /XD " & Chr(34) & "System Volume Information" & Chr(34) & " " & Chr(34) & _
;~                                         "$RECYCLE.BIN" & Chr(34) & " " & $Strdir & " /XF " & Chr(34) & "desktop.ini" & Chr(34) & " " & $Strfile
                        If Not ProcessExists("Robocopy.exe") Then Run($Roboload, @SystemDir, @SW_SHOW)
                        DirSize(GUICtrlRead($Input2), GUICtrlRead($Input1))
                        _GUICtrlListBox_BeginUpdate($List1)
                        Dim $listcount = _GUICtrlListBox_GetListBoxInfo($List1)
                        _GUICtrlListBox_EndUpdate($List1)
                        For $i = 0 to $listcount
                                Dim  $listGetCurSel =_GUICtrlListBox_GetText($List1,$i)
                                ;If $listGetCurSel Then $listGetCurSel &= $listGetCurSel
                       
                                If $listGetCurSel Then MsgBox(0,$listcount,$listGetCurSel)
                        Next
                        If $listGetCurSel Then MsgBox(0,"aaaa",$listGetCurSel)


这段AU3我不知道咋操作了,忘大神指导下
在VisualFreeBasic里可以这样赋值Strfile = Strfile & Chr(34) & List2.List(x) & Chr(34) & " "。出现效果是  "AAAA" "bbbba" "cccc"一类的合并为一行

本帖子中包含更多资源

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

×
 楼主| 发表于 2024-2-27 21:46:23 | 显示全部楼层
                        For $i = 0 To $listcount
                                Dim $listGetCurSel = _GUICtrlListBox_GetText($List1, $i)
                                If $listGetCurSel Then $Strdir= " " & $Strdir & Chr(34) & $listGetCurSel & Chr(34)
                        Next
                        If $listGetCurSel Then MsgBox(0, "aaaa", $Strdir)
                        但是按照VisualFreeBasic方式里去操作。循环里到最后一步可以出现要的结果。但是AU3循环结束后却读不出值了
发表于 2024-2-27 21:58:01 | 显示全部楼层
For $i = 0 to $listcount - 1
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-2 19:09 , Processed in 0.071874 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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