找回密码
 加入
搜索
查看: 8037|回复: 16

[AU3基础] 数组写入ListView

[复制链接]
发表于 2020-10-28 00:38:18 | 显示全部楼层 |阅读模式
本帖最后由 121044246 于 2020-11-7 01:25 编辑
#include <GuiListView.au3>
#include <Array.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
$texts = '0|{"IsSuccess":true,"ExceptionMessage":null,"ReturnValue":"{"dp":{"PageSize":20,"PageSizes":[20,50,100,200,400],"IsFirst":true,"IsLast":false,"PageCount":1702,"PageIndex":1,"DataCoun' _
&'t":34029,"SkipCount":0},"datas":[{"rn__":1,"checked":"","wave_id":34129,"type":"一单一件","picker_name":"小林","seeder_name":null,"order_count":1,"sku_count":1,"sku_qty":1,"pick' _
&'ed_qty":1,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh_id":"主仓","created":"2020-11-06 22:10:18","remark":"分销","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_' _
&'seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":null,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":null,"is_print_order":null,"is_print":null,"is_print_express":null,"is_print_' _
&'ordertags":null,"pick_invert":false,"wave_bin":null,"status":"Finished","priorty":3,"co_id":12345678,"__KeyData":"ZAa3tDHFjisu384gx/m32QL1YZx7J0MQuW4hrLlp810geLs9iKKn4s5YlLTgNAd1"},{\' _
&'"rn__":2,"checked":"","wave_id":34128,"type":"现场取货与大订单","picker_name":"小路","seeder_name":null,"order_count":1,"sku_count":5,"sku_qty":5,"picked_qty":5,"waitpick_qty":0,"' _
&'less_qty":0,"status_text":"已完成","wh_id":"主仓","created":"2020-11-06 21:47:28","remark":"JITX","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate"' _
&':null,"IsCreateAddPick":null,"pack_pick":null,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_in' _
&'vert":false,"wave_bin":null,"status":"Finished","priorty":1000,"co_id":12345678,"__KeyData":"kxp60w9qJjWv9zSYQJKcnLnmNaxca8R/fNpbGLBJ6J2bPNrLb0YmDrBube41NYv6"},{"rn__":3,"checked"' _
&':"","wave_id":34127,"type":"现场取货与大订单","picker_name":"小路","seeder_name":null,"order_count":1,"sku_count":2,"sku_qty":2,"picked_qty":2,"waitpick_qty":0,"less_qty":0,"status' _
&'_text":"已完成","wh_id":"主仓","created":"2020-11-06 21:33:44","remark":"成都","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAdd' _
&'Pick":null,"pack_pick":null,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_' _
&'bin":null,"status":"Finished","priorty":1000,"co_id":12345678,"__KeyData":"LbLs6Im0TxZyRl/RngoZfswX/obsHuuNiwpC34cN5BrWtKPxoi7eB3o_/=-Lj_/=-a4mcw"},{"rn__":4,"checked":"","wave_id"' _
&':34126,"type":"现场取货与大订单","picker_name":"小路","seeder_name":null,"order_count":1,"sku_count":5,"sku_qty":6,"picked_qty":6,"waitpick_qty":0,"less_qty":0,"status_text":"已完成' _
&'","wh_id":"主仓","created":"2020-11-06 21:33:44","remark":"上海","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pac' _
&'k_pick":null,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_bin":null,"sta' _
&'tus":"Finished","priorty":1000,"co_id":12345678,"__KeyData":"zybm8zqmZ4VxPS4HeggbqgugvoS8ny8NOnhA66UIqwQi0IPHxCRZ_/=-aqAaJ2_/=-x9nG"},{"rn__":5,"checked":"","wave_id":34125,' _
&'"type":"现场取货与大订单","picker_name":"小路","seeder_name":null,"order_count":1,"sku_count":1,"sku_qty":1,"picked_qty":1,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh' _
&'_id":"主仓","created":"2020-11-06 21:33:44","remark":"武汉","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pi' _
&'ck":null,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_bin":null,"statu' _
&'s":"Finished","priorty":1000,"co_id":12345678,"__KeyData":"ql3c3lj8O2bqq61l6fuzcEaA0kp0xSx6kdMWSJyuK6durLiaG9_/=-EbndWj6bn9Ore"},{"rn__":6,"checked":"","wave_id":34124,"type\' _
&'":"现场取货与大订单","picker_name":"小路","seeder_name":null,"order_count":1,"sku_count":2,"sku_qty":2,"picked_qty":2,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh_id":\' _
&'"主仓","created":"2020-11-06 21:33:44","remark":"广州","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":n' _
&'ull,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_bin":null,"status":"' _
&'Finished","priorty":1000,"co_id":12345678,"__KeyData":"iGuFzEXHZFTEKymrghIu/dKC6Q8bx1wJ0bmEYwHa5/eXeIaXjClSapx201T/NwBR"},{"rn__":7,"checked":"","wave_id":34123,"type":"现场' _
&'取货与大订单","picker_name":"小路","seeder_name":null,"order_count":1,"sku_count":5,"sku_qty":5,"picked_qty":5,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh_id":"主仓",' _
&'"created":"2020-11-06 21:29:01","remark":"早上大仓","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":null,"' _
&'no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_bin":null,"status":"Finis' _
&'hed","priorty":1000,"co_id":12345678,"__KeyData":"Do9jNKwq3xCv4mWVv20kqOMRwvvccW2/cW/yntV_/=-oG6VNuvV_/=-HrRqpOsP9KuDhMy"},{"rn__":8,"checked":"","wave_id":34122,"type\' _
&'":"现场取货与大订单","picker_name":"小路","seeder_name":null,"order_count":1,"sku_count":9,"sku_qty":9,"picked_qty":9,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh_id":' _
&'"主仓","created":"2020-11-06 21:10:09","remark":"JITX","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":nul' _
&'l,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_bin":null,"status":"Fi' _
&'nished","priorty":1000,"co_id":12345678,"__KeyData":"4w2678Fe2dkKSA7TwM0r2eC753atYSHIuOX_/=-JLQDEpARRragZk4g1BgBLTW2gC8X"},{"rn__":9,"checked":"","wave_id":34121,"type"' _
&':"一单一件","picker_name":"小路","seeder_name":null,"order_count":1,"sku_count":1,"sku_qty":1,"picked_qty":1,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh_id":"主仓","' _
&'created":"2020-11-06 21:06:17","remark":"分销","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":null,"no_pick_g' _
&'uid":null,"IsPreReduce":null,"IsStockout":null,"is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_bin":null,"status":"Finished","priorty' _
&'":3,"co_id":12345678,"__KeyData":"MDsLIIdZHOKfrV8bdiJj9d8DYZgENE_/=-oXyWjvZoxziDx57U1uVn5PUpPBWi4svd/"},{"rn__":10,"checked":"","wave_id":34120,"type":"现场取货与大订单","p' _
&'icker_name":"小路","seeder_name":null,"order_count":1,"sku_count":2,"sku_qty":2,"picked_qty":2,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh_id":"主仓","created":"2020' _
&'-11-06 20:24:19","remark":"西北仓","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":null,"no_pick_guid":null' _
&',"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":true,"wave_bin":null,"status":"Finished","priorty":1,"co_' _
&'id":12345678,"__KeyData":"ol67R9LSyH8IPaR6Q71eV6c3ZmUwB2W3Vt7JXbddVfDpvpC06TfLf_/=-vy/C3PgXbR"},{"rn__":11,"checked":"","wave_id":34119,"type":"现场取货与大订单","picker_name\' _
&'":"小林","seeder_name":null,"order_count":1,"sku_count":6,"sku_qty":7,"picked_qty":6,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh_id":"主仓","created":"2020-11-06 20:13:29","' _
&'remark":"JITX","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":null,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":\' _
&'"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":true,"wave_bin":null,"status":"Finished","priorty":1000,"co_id":12345678,"__KeyData":"ccUMl5bl' _
&'2ZSHO_/=-2TBilFJZx0Rlo2giqpYnW_/=-I8YH55Wusd4JjxQPc1p4HoXNSBMo"},{"rn__":12,"checked":"","wave_id":34118,"type":"现场取货与大订单","picker_name":"小纪","seeder_name":null,"order_count\' _
&'":1,"sku_count":4,"sku_qty":6,"picked_qty":6,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh_id":"主仓","created":"2020-11-06 20:09:56","remark":"早上大仓!","hybrid_pick":null,"split' _
&'_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":null,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is' _
&'_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_bin":null,"status":"Finished","priorty":1000,"co_id":12345678,"__KeyData":"y8qFoe2Fyy1RtcBz2W5Bx05UaH4TlonTARRwr3h3O8ukEu' _
&'6ksU3pvPMmIKP4fDob"},{"rn__":13,"checked":"","wave_id":34117,"type":"现场取货与大订单","picker_name":"小夏","seeder_name":null,"order_count":1,"sku_count":1,"sku_qty":1,"picked_qty":1,"w' _
&'aitpick_qty":0,"less_qty":0,"status_text":"已完成","wh_id":"主仓","created":"2020-11-06 18:59:53","remark":"沈阳仓","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need' _
&'_allocate":null,"IsCreateAddPick":null,"pack_pick":null,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_inv' _
&'ert":false,"wave_bin":null,"status":"Finished","priorty":1,"co_id":12345678,"__KeyData":"QPwK/AOu9A3gZKO692KPe0pZ9iCHdd6dPvKtAjkn8uAZt3ALahz4dVI5kTKHLCIY"},{"rn__":14,"checked":"","wave_id' _
&'":34116,"type":"现场取货与大订单","picker_name":"小路","seeder_name":null,"order_count":1,"sku_count":14,"sku_qty":19,"picked_qty":19,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh' _
&'_id":"主仓","created":"2020-11-06 18:05:48","remark":"JITX","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":null,"no_pic' _
&'k_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_bin":null,"status":"Finished","priorty":1000,' _
&'"co_id":12345678,"__KeyData":"B3BV_/=-IpKJlS3UB_/=-3oOKZhCSUWtOa1kD58jIgqR_/=-gOYcaqZCilP3ko95JpaenEpR8"},{"rn__":15,"checked":"","wave_id":34115,"type":"现场取货与大订单","picker_name\' _
&'":"小夏","seeder_name":null,"order_count":1,"sku_count":31,"sku_qty":33,"picked_qty":33,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh_id":"主仓","created":"2020-11-06 18:01:58","rema' _
&'rk":"北京仓","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":null,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false"' _
&',"is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_bin":null,"status":"Finished","priorty":1,"co_id":12345678,"__KeyData":"KDHWns1t3SY3kFLyztQwH' _
&'ALAq4l14QSn4SzJCjTb2hxyy/RvBSNA1qmHnewtMUR4"},{"rn__":16,"checked":"","wave_id":34114,"type":"现场取货与大订单","picker_name":"小纪","seeder_name":null,"order_count":1,"sku_count":42,"sku_qt' _
&'y":42,"picked_qty":41,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh_id":"主仓","created":"2020-11-06 18:01:57","remark":"成都仓","hybrid_pick":null,"split_pick":null,"paper_pick":null,"' _
&'pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":null,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags' _
&'":null,"pick_invert":false,"wave_bin":null,"status":"Finished","priorty":1,"co_id":12345678,"__KeyData":"MqW32dA_/=-pb1Sdxvn2piQsXgrRjsVTgUYEJbD97pU0q2dPk4hd8EAn2pLyFHsNYhl"},{"rn__":17,"checked":""' _
&',"wave_id":34113,"type":"现场取货与大订单","picker_name":"小纪","seeder_name":null,"order_count":1,"sku_count":51,"sku_qty":52,"picked_qty":52,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","' _
&'wh_id":"主仓","created":"2020-11-06 18:01:57","remark":"广州仓","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":null,"no_p' _
&'ick_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_bin":null,"status":"Finished","priorty":1,"co_id":1' _
&'0155056,"__KeyData":"JCGuvGFWgniTKYwPKWCiaqsbM6r9ho5W56WXVRjmpkyKqrefafE3qcalGRz1wur9"},{"rn__":18,"checked":"","wave_id":34112,"type":"现场取货与大订单","picker_name":"小夏","seeder_nam' _
&'e":null,"order_count":1,"sku_count":12,"sku_qty":12,"picked_qty":12,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh_id":"主仓","created":"2020-11-06 18:01:56","remark":"西北仓","hybrid_p' _
&'ick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":null,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null' _
&',"is_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_bin":null,"status":"Finished","priorty":1,"co_id":12345678,"__KeyData":"RsF4m0t4GHgHk7OYy3V2n6Wn_/=-4f4jVTUODBCh_/=-nVB_/=-phep4i' _
&'OeYq9lrPpSBZTu3N"},{"rn__":19,"checked":"","wave_id":34111,"type":"现场取货与大订单","picker_name":"小厦","seeder_name":null,"order_count":1,"sku_count":25,"sku_qty":26,"picked_qty":26,"waitpick_qty\' _
&'":0,"less_qty":0,"status_text":"已完成","wh_id":"主仓","created":"2020-11-06 18:01:55","remark":"上海仓","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCre' _
&'ateAddPick":null,"pack_pick":null,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false","is_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_bin":null,"sta' _
&'tus":"Finished","priorty":1,"co_id":12345678,"__KeyData":"Fc2Ru71zjTOLq81Nli/QrGnfTFwHtqZWDM6sdAaFlgB7qQ0gKPGrrYAeEnOEf_/=-nU"},{"rn__":20,"checked":"","wave_id":34110,"type":"现场取货与大订单","' _
&'picker_name":"小纪","seeder_name":null,"order_count":1,"sku_count":14,"sku_qty":14,"picked_qty":14,"waitpick_qty":0,"less_qty":0,"status_text":"已完成","wh_id":"主仓","created":"2020-11-06 18:01:54","' _
&'remark":"沈阳仓","hybrid_pick":null,"split_pick":null,"paper_pick":null,"pick_seed":null,"need_allocate":null,"IsCreateAddPick":null,"pack_pick":null,"no_pick_guid":null,"IsPreReduce":null,"IsStockout":"false","i' _
&'s_print_order":null,"is_print":null,"is_print_express":null,"is_print_ordertags":null,"pick_invert":false,"wave_bin":null,"status":"Finished","priorty":1,"co_id":12345678,"__KeyData":"ffJq7GfwYiBEJy4vRMot_/=-43AJEdqj' _
&'WZB95kVpbD71Vkav9wZe3diz8W5pqoxC42O"}]}","ExceptionText":null,"GotoLogin":false,"ClientScript":null,"Message":null,"LocationUrl":null,"OpenUrl":null,"IsReloadPage":false,"IsReloadData":false,"IsResetData":false}'




$data = StringRegExp($texts,'{\"rn__\":(\d+),.*?"wave_id\":(\d+),\"type\":\"(.*?)\",\"picker_name\":\\?"?(.*?)\\?"?,.*?\"order_count\":(\d+),.*?\"picked_qty\":(\d+),\"waitpick_qty\":(\d+),\"less_qty\":(\d+),\"status_text\":\"(.*?)\\.*?\"remark\":\\?"?(.*?)\\?"?,',3)
Local $arrays 
Local $array [UBound($data)][10]

For $i = 0 To UBound($data)/10-1
                For $a = 0 To 9
                        
                $array[$i][$a] = StringReplace($data[$i*10+$a],"null","")
                                
                                Next
Next
 GUICreate("listview items", 1100, 1100,-1, -1)
$idlistview = GUICtrlCreateListView ('序号|批次号|类型|拣货员|播种员|订单数|商品总数|已拣数|未拣数|缺货数',100,100,700,700)
GUISetState(@SW_SHOW)

_GUICtrlListView_AddArray($idlistview,$array)
For $i = 0 To 9
        _GUICtrlListView_SetColumnWidth ( $idlistview, $i,   $LVSCW_AUTOSIZE  )
Next

;~ _GUICtrlListView_BeginUpdate ( $idlistview )
;~ _GUICtrlListView_DeleteAllItems ( $idlistview )
;~ _GUICtrlListView_EndUpdate ( $idlistview )
While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
                EndSwitch                
WEnd

本帖子中包含更多资源

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

×
发表于 2020-10-28 09:43:14 | 显示全部楼层
光看这看不出来。我这_GUICtrlListView_AddArray添加是没问题的。

不过,要不先分个 内存块给 ListView 后再试一下。_GUICtrlListView_SetItemCount
发表于 2020-10-28 12:33:10 | 显示全部楼层
没贴出代码是看不出问题。判断是读取的数组问题
 楼主| 发表于 2020-10-28 15:15:26 | 显示全部楼层
绿色风 发表于 2020-10-28 09:43
光看这看不出来。我这_GUICtrlListView_AddArray添加是没问题的。

不过,要不先分个 内存块给 ListView  ...

谢谢,自己解决了,我把Listview的控件样式$LVS_SORTASCENDING取消排序就好了,,直接换成_ArraySort()数组排序后再写入Listview
 楼主| 发表于 2020-10-28 15:15:41 | 显示全部楼层
chzj589 发表于 2020-10-28 12:33
没贴出代码是看不出问题。判断是读取的数组问题

谢谢,自己解决了,我把Listview的控件样式$LVS_SORTASCENDING取消排序就好了,,直接换成_ArraySort()数组排序后再写入Listview
发表于 2020-10-28 21:05:43 | 显示全部楼层
121044246 发表于 2020-10-28 15:15
谢谢,自己解决了,我把Listview的控件样式$LVS_SORTASCENDING取消排序就好了,,直接换成_ArraySort()数组排 ...

那改成已解决吧。

点评

哈,原来不是排序问题,是因为数组变量在for里面,如果只有访问一个页面的时候正常,超过1个页面就会重新定义变量,所以内容就... 就是for next中间那个数组变量Items_kcz[][]位置的问题。  发表于 2020-10-29 08:31
 楼主| 发表于 2020-10-29 08:29:32 | 显示全部楼层
chzj589 发表于 2020-10-28 12:33
没贴出代码是看不出问题。判断是读取的数组问题

哈,原来不是排序问题,是因为数组变量在for里面,如果只有访问一个页面的时候正常,超过1个页面就会重新定义变量,所以内容就少了。
发表于 2020-10-29 10:18:54 | 显示全部楼层
121044246 发表于 2020-10-29 08:29
哈,原来不是排序问题,是因为数组变量在for里面,如果只有访问一个页面的时候正常,超过1个页面就会重新 ...

解决就好。写代码时,控件先不要加样式,
如:Local $idListview = GUICtrlCreateListView("列 1  |列 2|列 3  ", 10, 10, 200, 150)
代码运行正确后,再来设计样式达到要求。
 楼主| 发表于 2020-10-29 11:11:17 | 显示全部楼层
chzj589 发表于 2020-10-29 10:18
解决就好。写代码时,控件先不要加样式,
如:Local $idListview = GUICtrlCreateListView("列 1  |列 2 ...

好的。谢谢大佬
发表于 2020-10-30 18:07:40 | 显示全部楼层
麻烦发出来,让我学习一下
发表于 2020-11-6 22:32:15 | 显示全部楼层
学习一下学习一下
 楼主| 发表于 2020-11-7 01:23:53 | 显示全部楼层
zhao_ming 发表于 2020-10-30 18:07
麻烦发出来,让我学习一下

发了,代码在1楼
发表于 2020-11-22 13:30:41 | 显示全部楼层
看的我眼都花了,数组到窗口不是应该很简单么?
_GUICtrlListView_DeleteAllItems($Lw1)
_GUICtrlListView_AddArray($Lw1, $zbm)
发表于 2020-11-23 14:06:21 | 显示全部楼层
学习一下学习一下
发表于 2020-11-25 21:08:03 | 显示全部楼层
没看明白,写的好复杂
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-23 07:42 , Processed in 0.183027 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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