lynfr8 发表于 2011-3-15 22:12:44

回复 15# 872777825



谢谢反馈,所以非常奇怪的在win7可以完美执行的程序到了xp就失效了
真是奇怪
初步估计是这句代码在xp下出错无法获取值,所以无法获取安装文件的路径,导致没有正确执行安装$Groupname = _GUICtrlListView_GetGroupInfoByIndex($ListView, _GUICtrlListView_GetItemGroupID($ListView, $i) - 1)这里提出一个疑问:
_GUICtrlListView_GetGroupInfoByIndex是否在xp还是精简版的xp下失效?

我测试了UDF的例子,发现里面的msgbox根本就没有执行脚本就结束了
代码如下:#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>

Opt('MustDeclareVars', 1)

$Debug_LV = False ; Check ClassName being passed to ListView functions, set to True and use a handle to another control to see it work

_Main()

Func _Main()
        Local $aInfo, $hImage, $hListView
       
        GUICreate("ListView Get Group Info", 400, 300)

        $hListView = GUICtrlCreateListView("", 2, 2, 394, 268)
        GUISetState()

        ; Load images
        $hImage = _GUIImageList_Create()
        _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap(GUICtrlGetHandle($hListView), 0xFF0000, 16, 16))
        _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap(GUICtrlGetHandle($hListView), 0x00FF00, 16, 16))
        _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap(GUICtrlGetHandle($hListView), 0x0000FF, 16, 16))
        _GUICtrlListView_SetImageList($hListView, $hImage, 1)

        ; Add columns
        _GUICtrlListView_AddColumn($hListView, "Column 1", 100)
        _GUICtrlListView_AddColumn($hListView, "Column 2", 100)
        _GUICtrlListView_AddColumn($hListView, "Column 3", 100)

        ; Add items
        _GUICtrlListView_AddItem($hListView, "Row 1: Col 1", 0)
        _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 2", 1)
        _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 3", 2)
        _GUICtrlListView_AddItem($hListView, "Row 2: Col 1", 1)
        _GUICtrlListView_AddSubItem($hListView, 1, "Row 2: Col 2", 1)
        _GUICtrlListView_AddItem($hListView, "Row 3: Col 1", 2)

        ; Build groups
        _GUICtrlListView_EnableGroupView($hListView)
        _GUICtrlListView_InsertGroup($hListView, -1, 1, "Group 1", 1)
        _GUICtrlListView_InsertGroup($hListView, -1, 2, "Group 2")
        _GUICtrlListView_SetItemGroupID($hListView, 0, 1)
        _GUICtrlListView_SetItemGroupID($hListView, 1, 2)
        _GUICtrlListView_SetItemGroupID($hListView, 2, 2)

        ; Change group information
        For $x = 0 To _GUICtrlListView_GetGroupCount($hListView) - 1
                $aInfo = _GUICtrlListView_GetGroupInfoByIndex($hListView, $x)
                MsgBox(4160, "Information", "Index " & $x + 1 & "Text: " & $aInfo)
        Next
        _GUICtrlListView_SetGroupInfo($hListView, 1, "New Group 1")

        ; Loop until user exits
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
For $x = 0 To _GUICtrlListView_GetGroupCount($hListView) - 1
                $aInfo = _GUICtrlListView_GetGroupInfoByIndex($hListView, $x)
                MsgBox(4160, "Information", "Index " & $x + 1 & "Text: " & $aInfo)
        Next
        GUIDelete()
EndFunc   ;==>_Main希望大家也测试一下,并请反馈具体测试系统环境

xyhqqaa 发表于 2011-3-17 01:18:11

{:face (382):}kankan

feikrad 发表于 2011-3-17 09:39:11

看起来很舒服呼呼哈~{:face (88):}

颜俊清 发表于 2011-3-18 02:51:48

美观大于实用

lsszmj 发表于 2011-3-18 10:42:17

谢谢分享,用下了

devilma 发表于 2011-3-20 01:03:13

真漂亮,不知道成熟后,会不会开放一下源码呢?{:face (382):}

一堵墙 发表于 2011-3-28 22:15:01

配套使用很不错啊啊啊

一堵墙 发表于 2011-3-28 22:15:30

元老推荐的软件肯定好用

一堵墙 发表于 2011-3-28 22:16:28

撒花支持偶也

haijie1223 发表于 2011-3-31 13:50:11

上个版本报毒这个没问题把

qs2d 发表于 2011-3-31 16:33:40

不错 不错!!

pfvl2008 发表于 2011-4-1 23:07:43

回复 1# lynfr8


    金钱不足了,只下得一半

ghostmy 发表于 2011-4-2 03:58:33

好贵哦 我的天啊呵呵

ghostmy 发表于 2011-4-2 03:58:54

今天的钱不好转啊

16877567 发表于 2011-4-2 21:13:31

貌似不错啊~
页: 1 [2] 3 4 5 6 7 8 9 10 11
查看完整版本: i-Autoit软件安装管理器测试版