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

[AU3基础] [已解决]要抓Listview裡面Status列裡面有幾個Noupdate

[复制链接]
发表于 2016-10-10 09:10:11 | 显示全部楼层 |阅读模式
本帖最后由 ipmitool 于 2016-10-11 16:47 编辑

請問一下我寫了一段程式要抓Status有幾個Noupdate
可是怎麼抓到的數量是Noupdate+Ongoing的數量?
是不是我的正則邏輯有問題...

$noupdate_going = _GUICtrlListView_GetItemText($hListView,$j+1,7) ---> 去抓我現在Noupdate的字串是有抓到的

可是下面這三行好像除了抓noupdate, 連不是noupdate都+1了...這要怎麼處理? 我只要Noupdate的數量...
For $countNoupdate = 0 To UBound($aNewList)-1 STEP 1
if $noupdate_going="Noupdate" Then
$countNoupdate=$countNoupdate+1

                If IsArray($OldList) Then
                                ReDim $aNewList0[UBound($OldList)][16]
                                For $j=0 TO UBound($OldList)-1 STEP 1

                                        IF $aNewList0[$j][15] < $systemtime THEN
                                                _GUICtrlListView_SetItemText($hListView, $j+1,"Noupdate",7)


                                        Else
                                                _GUICtrlListView_SetItemText($hListView, $j+1,"Ongoing",7)

                                        EndIf


                                $noupdate_going=_GUICtrlListView_GetItemText($hListView,$j+1,7)
                                        


                                For $countNoupdate = 0 To UBound($aNewList)-1 STEP 1

                                if $noupdate_going="Noupdate" Then
                                        $countNoupdate=$countNoupdate+1

                                        Else

                                        EndIf

                                
                                Next

                                GUICtrlCreateLabel('Noupdate: '&$countNoupdate, 800, 560, 100, 20)
                                $countOngoing=UBound($aNewList)-$countNoupdate
                                GUICtrlCreateLabel('Ongoing: '&$countOngoing, 800, 580, 100, 20)

                                Next

                                $OldList=$aNewList0

                Else
                                $OldList=$aNewList0

                EndIf

本帖子中包含更多资源

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

×
 楼主| 发表于 2016-10-11 15:41:01 | 显示全部楼层
不曉得有人可以幫忙嗎...謝謝喔...
 楼主| 发表于 2016-10-11 16:46:39 | 显示全部楼层
解決嘍~謝謝大家
                If IsArray($OldList) Then
                                ReDim $aNewList0[UBound($OldList)][16]
                                For $j=0 TO UBound($OldList)-1 STEP 1

                                        IF $aNewList0[$j][15] < $systemtime THEN
                                                _GUICtrlListView_SetItemText($hListView, $j+1,"Noupdate",7)


                                        Else
                                                _GUICtrlListView_SetItemText($hListView, $j+1,"Ongoing",7)

                                        EndIf


                                $noupdate_going=_GUICtrlListView_GetItemText($hListView,$j+1,7)


                                if $noupdate_going="Noupdate" Then
                                $iii=$iii+1
                                Else
                                EndIf

                                if $noupdate_going="Ongoing" Then
                                $ooo=$ooo+1
                                Else
                                EndIf

                                Next


                                GUICtrlCreateLabel('Noupdate: '&$iii, 800, 560, 100, 20)
                                GUICtrlCreateLabel('Ongoing: '&$ooo, 800, 580, 100, 20)
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-27 10:13 , Processed in 0.073448 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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