Jump to content

Compare ListViewItems


Recommended Posts

HI,

Please help me to compare listViewitems item with...

i want to create script that read value form first ListView & compare it with all Items in Second list view.

If match found then... it select next item form first list view and again compare with all items in second list view... if match found.. it follow last procedure & if not found then it will save that item to third list view.

Please hlpe to create compare logic..

Thx

Rahul

Example ListView script attached...

In example i want to Compare Col1 items with Col2 & to add Col1 not matched with Col2 items in Col3

ListView.AU3

Link to comment
Share on other sites

requires beta

#include <GUIConstants.au3>
#include <GuiListView.au3>

GUICreate("listview items", 460, 350, 100, 200, -1, $WS_EX_ACCEPTFILES)
GUISetBkColor(0x00E0FFFF)  ; will change background color

$listview = GUICtrlCreateListView("col1  ", 10, 10, 200, 150);,$LVS_SORTDESCENDING)

$item1 = GUICtrlCreateListViewItem("item1", $listview)
$item2 = GUICtrlCreateListViewItem("item2", $listview)
$item3 = GUICtrlCreateListViewItem("item3", $listview)
$item4 = GUICtrlCreateListViewItem("item4", $listview)
$item5 = GUICtrlCreateListViewItem("item5", $listview)
$item6 = GUICtrlCreateListViewItem("item6", $listview)
$item7 = GUICtrlCreateListViewItem("item7", $listview)
$item8 = GUICtrlCreateListViewItem("item8", $listview)
$item9 = GUICtrlCreateListViewItem("item9", $listview)

GUICtrlSetState(-1, $GUI_DROPACCEPTED)   ; to allow drag and dropping

$listviewB = GUICtrlCreateListView("col2  ", 10, 180, 200, 150);,$LVS_SORTDESCENDING)
$itemB1 = GUICtrlCreateListViewItem("item2", $listviewB)
$itemB2 = GUICtrlCreateListViewItem("item1", $listviewB)
$itemB3 = GUICtrlCreateListViewItem("item3", $listviewB)

$listviewC = GUICtrlCreateListView("col3  ", 220, 10, 200, 150);,$LVS_SORTDESCENDING)
$btn_compare = GUICtrlCreateButton("Compare", 260, 190, 120, 25)
GUISetState()

Do
    $msg = GUIGetMsg()
    
    Select
        Case $msg = $btn_compare
            For $x = 0 To _GUICtrlListViewGetItemCount($listview) - 1
                $found = False
                $s_item1 = _GUICtrlListViewGetItemText($listview, $x, 0)
                For $y = 0 To _GUICtrlListViewGetItemCount($listviewB) - 1
                    $s_item2 = _GUICtrlListViewGetItemText($listviewB, $y, 0)
                    If StringUpper($s_item1) = StringUpper($s_item2) Then
                        $found = True
                        ExitLoop
                    EndIf
                Next
                If Not $found Then GUICtrlCreateListViewItem($s_item1, $listviewC)
            Next
        Case $msg = $listview
            MsgBox(0, "listview", "clicked=" & GUICtrlGetState($listview), 2)
    EndSelect
Until $msg = $GUI_EVENT_CLOSE

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

gafrost thx for the help..

my problem has solved... but now i am facing very strange problem with

_GUICtrlListViewGetItemText($listview, $x, 0)

function..

I am comparing very large number of values. While running script if i click on some other window or if this script GUI window is not active then its showing ITEM TEXT as -1.

When i am aging select this GUI its start retrieving original text from LISTVIEW.

If i lock the windows screen then its again start retrieving vale as -1. To get it worked properly i am keeping this gui active & PC idle for this work & its very odd situation.

Please help me so that it should work in any case (PC is locked or i am working on other applications)

test script attached... Click on Compare & same time click on some other window... you will find that it will not add value.. if you put msgbox to display listview read value at that time... that will be -1

ListView.AU3

Edited by Rahul Rohela
Link to comment
Share on other sites

gafrost thx for the help..

my problem has solved... but now i am facing very strange problem with

_GUICtrlListViewGetItemText($listview, $x, 0)

function..

I am comparing very large number of values. While running script if i click on some other window or if this script GUI window is not active then its showing ITEM TEXT as -1.

When i am aging select this GUI its start retrieving original text from LISTVIEW.

If i lock the windows screen then its again start retrieving vale as -1. To get it worked properly i am keeping this gui active & PC idle for this work & its very odd situation.

Please help me so that it should work in any case (PC is locked or i am working on other applications)

test script attached... Click on Compare & same time click on some other window... you will find that it will not add value.. if you put msgbox to display listview read value at that time... that will be -1

I have same problem yesterday:

_GUICtrlListViewGetItemText($listview, $x, 0) is working only when my GUI is active.

Look into include\GuiListView.au3 and you will see problem:

Func _GUICtrlListViewGetItemText($h_listview, $i_Item = -1, $i_SubItem = -1, $s_WindowTitle = "", $s_WindowText = "")
    Local $X, $count, $str
    If (StringLen($s_WindowTitle) == 0) Then
        $s_WindowTitle = WinGetTitle("")
    EndIf
    ...

As you can see he needs also window title for ControlListview and other calls and get it by WinGetTitle("")

which gets title of active window. That's reason of problem.

So solution is to rewrite include\GuiListView.au3\_GUICtrlListViewGetItemText

or you can call directly

ControlListView($s_WindowTitle, $s_WindowText, $h_listview, "GetText", $i_Item, $i_SubItem)
instead of using _GUICtrlListViewGetItemText

and in $s_WindowTitle parameter place handle of your GUI obtained from GUICreate.

Link to comment
Share on other sites

I am currently working on a re-write of the GuiListView.au3, working on doing away with the controllistview.

This may take some time.

Gary

Hi Gary

If you are working on it, I think it should be done in same way as GUITreeView.au3,

but I expect you know about it :D

As GUIListView.au3 is BIGGEST standard include file, I wish you good luck with rewriting it :D

These standard AutoIt include files are very helpfull inspiration base for me, so I appreciate your work on it.

Zedna

Link to comment
Share on other sites

I have the same problem with _GUICtrlListViewGetItemText

Also in my "updater" script it sometimes happens that the .ini file is full of "-1"

Updater

Thanks gafrost for working on it. :D

But is there a temporary workaround ?

Maybe do a "WinActivate" and "WinSetOnTop" just before the "_GUICtrlListViewGetItemText" ?

any ideas ?

D2charkeeper = No more 'expired characters' in D2.File Date Changer = Change the file date(s), attributes and the filename case of multiple files @ once.Updater_full = Copy/Update your autoitscripts, pictures, .mp3, .avi etc ... subdirs from your PC to your memory stick or to your external harddisk. Now with scheduling and logging.Questmapper
Link to comment
Share on other sites

I have the same problem with _GUICtrlListViewGetItemText

Also in my "updater" script it sometimes happens that the .ini file is full of "-1"

Updater

Thanks gafrost for working on it. :D

But is there a temporary workaround ?

Maybe do a "WinActivate" and "WinSetOnTop" just before the "_GUICtrlListViewGetItemText" ?

any ideas ?

Submitted the new GuiListView.au3 yesterday alnong with some new help file templates and examples.

Gary

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

So I guess it will be in beta release v3.1.1.127 ? :D

That's great !

You are the man ! :D

D2charkeeper = No more 'expired characters' in D2.File Date Changer = Change the file date(s), attributes and the filename case of multiple files @ once.Updater_full = Copy/Update your autoitscripts, pictures, .mp3, .avi etc ... subdirs from your PC to your memory stick or to your external harddisk. Now with scheduling and logging.Questmapper
Link to comment
Share on other sites

Problem solved by changing

_GUICtrlListViewGetItemText($listview, $x, 0) to _GUICtrlListViewGetItemText($List_SW,$Count, 0,"GUI Titel")

GUI Title is what i used in

GUICreate ( "title" [, width [, height [, left [, top [, style [, exStyle [, parent]]]]]]] )

Thx for help..

Edited by Rahul Rohela
Link to comment
Share on other sites

  • 2 weeks later...

requires beta

#include <GUIConstants.au3>
#include <GuiListView.au3>

GUICreate("listview items", 460, 350, 100, 200, -1, $WS_EX_ACCEPTFILES)
GUISetBkColor(0x00E0FFFF)  ; will change background color

$listview = GUICtrlCreateListView("col1  ", 10, 10, 200, 150);,$LVS_SORTDESCENDING)

$item1 = GUICtrlCreateListViewItem("item1", $listview)
$item2 = GUICtrlCreateListViewItem("item2", $listview)
$item3 = GUICtrlCreateListViewItem("item3", $listview)
$item4 = GUICtrlCreateListViewItem("item4", $listview)
$item5 = GUICtrlCreateListViewItem("item5", $listview)
$item6 = GUICtrlCreateListViewItem("item6", $listview)
$item7 = GUICtrlCreateListViewItem("item7", $listview)
$item8 = GUICtrlCreateListViewItem("item8", $listview)
$item9 = GUICtrlCreateListViewItem("item9", $listview)

GUICtrlSetState(-1, $GUI_DROPACCEPTED)   ; to allow drag and dropping

$listviewB = GUICtrlCreateListView("col2  ", 10, 180, 200, 150);,$LVS_SORTDESCENDING)
$itemB1 = GUICtrlCreateListViewItem("item2", $listviewB)
$itemB2 = GUICtrlCreateListViewItem("item1", $listviewB)
$itemB3 = GUICtrlCreateListViewItem("item3", $listviewB)

$listviewC = GUICtrlCreateListView("col3  ", 220, 10, 200, 150);,$LVS_SORTDESCENDING)
$btn_compare = GUICtrlCreateButton("Compare", 260, 190, 120, 25)
GUISetState()

Do
    $msg = GUIGetMsg()
    
    Select
        Case $msg = $btn_compare
            For $x = 0 To _GUICtrlListViewGetItemCount($listview) - 1
                $found = False
                $s_item1 = _GUICtrlListViewGetItemText($listview, $x, 0)
                For $y = 0 To _GUICtrlListViewGetItemCount($listviewB) - 1
                    $s_item2 = _GUICtrlListViewGetItemText($listviewB, $y, 0)
                    If StringUpper($s_item1) = StringUpper($s_item2) Then
                        $found = True
                        ExitLoop
                    EndIf
                Next
                If Not $found Then GUICtrlCreateListViewItem($s_item1, $listviewC)
            Next
        Case $msg = $listview
            MsgBox(0, "listview", "clicked=" & GUICtrlGetState($listview), 2)
    EndSelect
Until $msg = $GUI_EVENT_CLOSE

This is now not working with Beta autoit-v3.1.1.127

Please help

Edited by Rahul Rohela
Link to comment
Share on other sites

Works for me...

Might want to check out the following bug fixes, change your Include with these and see if that works.

http://www.autoitscript.com/forum/index.php?showtopic=27914

http://www.autoitscript.com/forum/index.php?showtopic=27921

I tested with a large amount of data in the listview(s) with the code below.

#include <GUIConstants.au3>
#include <GuiListView.au3>

GUICreate("listview items", 460, 350, 100, 200, -1, $WS_EX_ACCEPTFILES)
GUISetBkColor(0x00E0FFFF); will change background color

$listview = GUICtrlCreateListView("col1 ", 10, 10, 200, 150);,$LVS_SORTDESCENDING)
For $x = 1 To 1000
    GUICtrlCreateListViewItem("item" & $x, $listview)
Next

GUICtrlSetState(-1, $GUI_DROPACCEPTED); to allow drag and dropping

$listviewB = GUICtrlCreateListView("col2 ", 10, 180, 200, 150);,$LVS_SORTDESCENDING)
$itemB1 = GUICtrlCreateListViewItem("item2", $listviewB)
$itemB2 = GUICtrlCreateListViewItem("item1", $listviewB)
$itemB3 = GUICtrlCreateListViewItem("item3", $listviewB)
For $x = 4 To 100
    GUICtrlCreateListViewItem("item" & $x, $listviewB)
Next
    

$listviewC = GUICtrlCreateListView("col3 ", 220, 10, 200, 150);,$LVS_SORTDESCENDING)
$btn_compare = GUICtrlCreateButton("Compare", 260, 190, 120, 25)
GUISetState()

Do
    $msg = GUIGetMsg()
    
    Select
        Case $msg = $btn_compare
            For $x = 0 To _GUICtrlListViewGetItemCount($listview) - 1
                $found = False
                $s_item1 = _GUICtrlListViewGetItemText($listview, $x, 0)
                For $y = 0 To _GUICtrlListViewGetItemCount($listviewB) - 1
                    $s_item2 = _GUICtrlListViewGetItemText($listviewB, $y, 0)
                    If StringUpper($s_item1) = StringUpper($s_item2) Then
                        $found = True
                        ExitLoop
                    EndIf
                Next
                If Not $found Then GUICtrlCreateListViewItem($s_item1, $listviewC)
            Next
        Case $msg = $listview
            MsgBox(0, "listview", "clicked=" & GUICtrlGetState($listview), 2)
    EndSelect
Until $msg = $GUI_EVENT_CLOSE

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Hi Gafrost

I upgraded to your latest GuiListView.au3 (v1.63)

and applyed the 2 above mentioned bugfixes.

But my "-1" problem in my .ini file seems to have worsened :D

You' ll see what I mean : even moving up or down and then pushing "cancel"

will fill the .ini file with "-1" values now.

Can you please take a look ?

Your changed GuiListView.au3 (that I used for the compile) :

What goes wrong ?

Edited by Gyzmok
D2charkeeper = No more 'expired characters' in D2.File Date Changer = Change the file date(s), attributes and the filename case of multiple files @ once.Updater_full = Copy/Update your autoitscripts, pictures, .mp3, .avi etc ... subdirs from your PC to your memory stick or to your external harddisk. Now with scheduling and logging.Questmapper
Link to comment
Share on other sites

Hi Gafrost

I upgraded to your latest GuiListView.au3 (v1.63)

and applyed the 2 above mentioned bugfixes.

But my "-1" problem in my .ini file seems to have worsened :D

You' ll see what I mean : even moving up or down and then pushing "cancel"

will fill the .ini file with "-1" values now.

Can you please take a look ?

Your changed GuiListView.au3 (that I used for the compile) :

What goes wrong ?

Take the $ off the Front of Total_updates in the ini file

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Ok, Gary the $ should not have been there : nice tnx :D

BUT : The problem did not go away ! :D

It wasn't, untill I went back to your original GuiListView.au3 (v1.63)

The one where I didn't apply the 'bugfixes' :

http://www.autoitscript.com/forum/index.php?showtopic=27914

http://www.autoitscript.com/forum/index.php?showtopic=27921

So : it seems to works fine without the above changes in GuiListView.au3 ?

Guess I stick to this one ?

Edited by Gyzmok
D2charkeeper = No more 'expired characters' in D2.File Date Changer = Change the file date(s), attributes and the filename case of multiple files @ once.Updater_full = Copy/Update your autoitscripts, pictures, .mp3, .avi etc ... subdirs from your PC to your memory stick or to your external harddisk. Now with scheduling and logging.Questmapper
Link to comment
Share on other sites

I looked a bit closer and see where the "-1" came from.

When an error occurs, your UDF returns : $LV_ERR = -1

The line that throws back the error is this line :

If Not GUICtrlSendMsg($h_listview, $LVM_GETITEMTEXTA, $i_Item, DllStructGetPtr($p)) Then Return $LV_ERR

inside the 'bugfixed' code of the UDF : _GUICtrlListViewGetItemText

...
    ElseIf ($i_SubItem < $count) Then; return the subitem in the item
        DllStructSetData($p, 3, $i_SubItem)
        If IsHWnd($h_listview) Then
            DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_listview, "int", $LVM_GETITEMTEXTA, "int", $i_Item, "ptr", DllStructGetPtr($p))
            If @error Then Return $LV_ERR
        Else
            If Not GUICtrlSendMsg($h_listview, $LVM_GETITEMTEXTA, $i_Item, DllStructGetPtr($p)) Then Return $LV_ERR
        EndIf
        Return DllStructGetData($sp, 1)
    Else
...
oÝ÷ Ù.¡»â¢ë%ɽý¶¶©ßÙ¨­ç«®ìý¸§¶·õ» ~,^w¡×­©Ûyú+)ÚýzÝ@ÅB¶¹KËUìzÒ-zdÞÆÖ®¶­s`¢ââà VÇ6Tbb33c¶õ7V$FVÒfÇC²b33c¶6÷VçBFVã²&WGW&âFR7V&FVÒâFRFVÐ FÆÅ7G'V7E6WDFFb33c·Â2Âb33c¶õ7V$FVÒ b4væBb33c¶öÆ7GfWrFVà b33c·e÷&WBÒFÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷Cµ6VæDÖW76vRgV÷C²ÂgV÷C¶væBgV÷C²Âb33c¶öÆ7GfWrÂgV÷C¶çBgV÷C²Âb33c´ÅdÕôtUDDTÕDUDÂgV÷C¶çBgV÷C²Âb33c¶ôFVÒÂgV÷C·G"gV÷C²ÂFÆÅ7G'V7DvWEG"b33c· VÇ6P b33c·e÷&WBÒuT7G&Å6VæD×6rb33c¶öÆ7GfWrÂb33c´ÅdÕôtUDDTÕDUDÂb33c¶ôFVÒÂFÆÅ7G'V7DvWEG"b33c· VæD` &WGW&âFÆÅ7G'V7DvWDFFb33c·7 VÇ6P¢ââà

Question : Why does the error occur ?

Is it essential ?

because I have the impression that my script works fine with the code that doesn't report the error. (even when it's there) :D

Edited by Gyzmok
D2charkeeper = No more 'expired characters' in D2.File Date Changer = Change the file date(s), attributes and the filename case of multiple files @ once.Updater_full = Copy/Update your autoitscripts, pictures, .mp3, .avi etc ... subdirs from your PC to your memory stick or to your external harddisk. Now with scheduling and logging.Questmapper
Link to comment
Share on other sites

I looked a bit closer and see where the "-1" came from.

When an error occurs, your UDF returns : $LV_ERR = -1

The line that throws back the error is this line :

If Not GUICtrlSendMsg($h_listview, $LVM_GETITEMTEXTA, $i_Item, DllStructGetPtr($p)) Then Return $LV_ERR

inside the 'bugfixed' code of the UDF : _GUICtrlListViewGetItemText

...
    ElseIf ($i_SubItem < $count) Then; return the subitem in the item
        DllStructSetData($p, 3, $i_SubItem)
        If IsHWnd($h_listview) Then
            DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_listview, "int", $LVM_GETITEMTEXTA, "int", $i_Item, "ptr", DllStructGetPtr($p))
            If @error Then Return $LV_ERR
        Else
            If Not GUICtrlSendMsg($h_listview, $LVM_GETITEMTEXTA, $i_Item, DllStructGetPtr($p)) Then Return $LV_ERR
        EndIf
        Return DllStructGetData($sp, 1)
    Else
...
oÝ÷ Ù.¡»â¢ë%ɽý¶¶©ßÙ¨­ç«®ìý¸§¶·õ» ~,^w¡×­©Ûyú+)ÚýzÝ@ÅB¶¹KËUìzÒ-zdÞÆÖ®¶­s`¢ââà VÇ6Tbb33c¶õ7V$FVÒfÇC²b33c¶6÷VçBFVã²&WGW&âFR7V&FVÒâFRFVÐ FÆÅ7G'V7E6WDFFb33c·Â2Âb33c¶õ7V$FVÒ b4væBb33c¶öÆ7GfWrFVà b33c·e÷&WBÒFÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷Cµ6VæDÖW76vRgV÷C²ÂgV÷C¶væBgV÷C²Âb33c¶öÆ7GfWrÂgV÷C¶çBgV÷C²Âb33c´ÅdÕôtUDDTÕDUDÂgV÷C¶çBgV÷C²Âb33c¶ôFVÒÂgV÷C·G"gV÷C²ÂFÆÅ7G'V7DvWEG"b33c· VÇ6P b33c·e÷&WBÒuT7G&Å6VæD×6rb33c¶öÆ7GfWrÂb33c´ÅdÕôtUDDTÕDUDÂb33c¶ôFVÒÂFÆÅ7G'V7DvWEG"b33c· VæD` &WGW&âFÆÅ7G'V7DvWDFFb33c·7 VÇ6P¢ââà

Question : Why does the error occur ?

Is it essential ?

because I have the impression that my script works fine with the code that doesn't report the error. (even when it's there) :D

The error occurs when you try to get text from an item that doesn't exist.

If you noticed in your ini 6 - 99 were -1 because of the default value from the ini read where you were trying to read Total_updates when $Total_updates was in the ini file.

The UDF returns the error, it's up to you to check for an error.

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Works for me...

Might want to check out the following bug fixes, change your Include with these and see if that works.

http://www.autoitscript.com/forum/index.php?showtopic=27914

http://www.autoitscript.com/forum/index.php?showtopic=27921

I tested with a large amount of data in the listview(s) with the code below.

#include <GUIConstants.au3>
#include <GuiListView.au3>

GUICreate("listview items", 460, 350, 100, 200, -1, $WS_EX_ACCEPTFILES)
GUISetBkColor(0x00E0FFFF); will change background color

$listview = GUICtrlCreateListView("col1 ", 10, 10, 200, 150);,$LVS_SORTDESCENDING)
For $x = 1 To 1000
    GUICtrlCreateListViewItem("item" & $x, $listview)
Next

GUICtrlSetState(-1, $GUI_DROPACCEPTED); to allow drag and dropping

$listviewB = GUICtrlCreateListView("col2 ", 10, 180, 200, 150);,$LVS_SORTDESCENDING)
$itemB1 = GUICtrlCreateListViewItem("item2", $listviewB)
$itemB2 = GUICtrlCreateListViewItem("item1", $listviewB)
$itemB3 = GUICtrlCreateListViewItem("item3", $listviewB)
For $x = 4 To 100
    GUICtrlCreateListViewItem("item" & $x, $listviewB)
Next
    

$listviewC = GUICtrlCreateListView("col3 ", 220, 10, 200, 150);,$LVS_SORTDESCENDING)
$btn_compare = GUICtrlCreateButton("Compare", 260, 190, 120, 25)
GUISetState()

Do
    $msg = GUIGetMsg()
    
    Select
        Case $msg = $btn_compare
            For $x = 0 To _GUICtrlListViewGetItemCount($listview) - 1
                $found = False
                $s_item1 = _GUICtrlListViewGetItemText($listview, $x, 0)
                For $y = 0 To _GUICtrlListViewGetItemCount($listviewB) - 1
                    $s_item2 = _GUICtrlListViewGetItemText($listviewB, $y, 0)
                    If StringUpper($s_item1) = StringUpper($s_item2) Then
                        $found = True
                        ExitLoop
                    EndIf
                Next
                If Not $found Then GUICtrlCreateListViewItem($s_item1, $listviewC)
            Next
        Case $msg = $listview
            MsgBox(0, "listview", "clicked=" & GUICtrlGetState($listview), 2)
    EndSelect
Until $msg = $GUI_EVENT_CLOSE
Not working for me.. I am using windows 2000 prof system..

Its working fine with autoit-v3.1.1.126 not with autoit-v3.1.1.127

Screen shot attched you can see CPU usage to 100% & result is nothing...

Link to comment
Share on other sites

Ok Thanks Gary, got it.

(The Total_updates and $Total_updates had nothing to do with it because the default iniread value was 99 and also the value inside the .ini was 99 but tnx for noticing it.)

It was here where the "-1" originated from :

With _iniwrite(), I allways store all colums that are not "empty".

An empty subitem does not simply returns "" from your UDF anymore, but returns "-1" (error) now.

Solution :

I simply changed this :

func _iniwrite()
    for $i = 0 to $Total_updates step 1
         if _GUICtrlListViewGetCheckedState($mylist,$i) = 1 then
             IniWrite("Updater.ini","TASKS","active"&$i,"1")
         Else
             IniWrite("Updater.ini","TASKS","active"&$i,"0")
         EndIf
         if _GUICtrlListViewGetItemText($mylist,$i,1) <> "" then
             IniWrite("Updater.ini","TASKS","Task_source"&$i,_GUICtrlListViewGetItemText($mylist,$i,1))
         Else
             IniWrite("Updater.ini","TASKS","Task_source"&$i,"STOP")
         EndIf
         if _GUICtrlListViewGetItemText($mylist,$i,2) <> "" then
             IniWrite("Updater.ini","TASKS","Task_destination"&$i,_GUICtrlListViewGetItemText($mylist,$i,2))
         Else
             IniWrite("Updater.ini","TASKS","Task_destination"&$i,"STOP")
         EndIf
         if _GUICtrlListViewGetItemText($mylist,$i,3) <> "" then
             IniWrite("Updater.ini","TASKS","Last_update"&$i,_GUICtrlListViewGetItemText($mylist,$i,3))
         Else
             IniWrite("Updater.ini","TASKS","Last_update"&$i,"-")
         EndIf
    Next
    sleep(50)
EndFunc  ;==>_iniwrite

and it's seems to work fine again. :D

Edited by Gyzmok
D2charkeeper = No more 'expired characters' in D2.File Date Changer = Change the file date(s), attributes and the filename case of multiple files @ once.Updater_full = Copy/Update your autoitscripts, pictures, .mp3, .avi etc ... subdirs from your PC to your memory stick or to your external harddisk. Now with scheduling and logging.Questmapper
Link to comment
Share on other sites

@ Rahul Rohela : it does work on XP with autoit-v3.1.1.127 and v1.63 GuiListView.au3 + bugfixes on my end.

I cannot test it on Windows 2000 prof here ... :D

Let's see if someone can... ? Gafrost ?

D2charkeeper = No more 'expired characters' in D2.File Date Changer = Change the file date(s), attributes and the filename case of multiple files @ once.Updater_full = Copy/Update your autoitscripts, pictures, .mp3, .avi etc ... subdirs from your PC to your memory stick or to your external harddisk. Now with scheduling and logging.Questmapper
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...