Moderators Melba23 Posted August 6, 2019 Author Moderators Share Posted August 6, 2019 jimmy123j, Have you read this section of the guide which is included in the UDF download: Quote Closure and Reloading: If you delete the ListView, then it is recommended to use _GUIListViewEx_Close to free the memory used by the UDF. If you wish to reload the ListView with new data, you will need to clear the current content using _GUICtrlListView_DeleteAllItems, close it within the UDF using _GUIListViewEx_Close, reload the ListView with the new data and then reinitialise it using _GUIListViewEx_Init. Otherwise the UDF will become confused about the current content and errors will certainly occur. It looks to me as if you are deleting the original data, but then NOT closing the existing instance of the ListView in the UDF before reloading it with data (and possibly reinitialising - that is not clear). In this case the UDF still believes that the ListView contains data and so will get very confused as the actual content - which is indicated by the error you get showing that the UDF internal map no longer matches the actual content. So I recommend something along these lines: ; Clear the ListView _GUICtrlListView_DeleteAllItems($TableList) ; Close it within the UDF _GUIListViewEx_Close(TableIndex) ; Add new data _GUICtrlListView_AddArray($TableList, $TableArray) ; Reinitialise the ListView with the new data $TableIndex = _GUIListViewEx_Init($TableList, $TableArray, 0, Default, False, 32 + 512) Does that solve the problem? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
jimmy123j Posted August 7, 2019 Share Posted August 7, 2019 5 hours ago, Melba23 said: jimmy123j, Have you read this section of the guide which is included in the UDF download: It looks to me as if you are deleting the original data, but then NOT closing the existing instance of the ListView in the UDF before reloading it with data (and possibly reinitialising - that is not clear). In this case the UDF still believes that the ListView contains data and so will get very confused as the actual content - which is indicated by the error you get showing that the UDF internal map no longer matches the actual content. So I recommend something along these lines: ; Clear the ListView _GUICtrlListView_DeleteAllItems($TableList) ; Close it within the UDF _GUIListViewEx_Close(TableIndex) ; Add new data _GUICtrlListView_AddArray($TableList, $TableArray) ; Reinitialise the ListView with the new data $TableIndex = _GUIListViewEx_Init($TableList, $TableArray, 0, Default, False, 32 + 512) Does that solve the problem? M23 Yes, I've been try to use the GUIListViewEx_Close($TableIndex) at same position, before I ask the question ( not work to me) But I just try move over to _GUICtrlListView_DeleteAllItems($TableList), then it's work _GUIListViewEx_Close($TableIndex) _GUICtrlListView_DeleteAllItems($TableList) _GUICtrlListView_AddArray($TableList, $TableArray) $TableIndex = _GUIListViewEx_Init($TableList, $TableArray, 0, Default, False, 32 + 512) really really thank you M23, and forgive my foolish Thanks again !!! Link to comment Share on other sites More sharing options...
MattHiggs Posted August 18, 2019 Share Posted August 18, 2019 (edited) Nevermind Edited August 18, 2019 by MattHiggs figured it out Link to comment Share on other sites More sharing options...
Inpho Posted September 26, 2019 Share Posted September 26, 2019 Hi M23, hope you're well. I've added the functions from your UDF to my Calltips, and when using them, it highlighted something almost confusing: I've always ignored the second param for _GUIListViewEx_ReadToArray as I pretty much always want a count in [0]. But after comparing the results from Header Mode and Direct Mode parsing when adding Calltips, it seems that the param is named $iStart in the code for the function. If a user was to use Direct Mode when adding Calltips, then the name of the param would imply that it's "which row to start from" rather than "hold count in [0]". A niggly, non-important thing that would be solved if a user was to take a few seconds to look at the function header; just thought I'd highlight it as you're usually nothing but consistent. Link to comment Share on other sites More sharing options...
trn80 Posted December 6, 2019 Share Posted December 6, 2019 Hello, it is possible to attach a personalized function when double click a specified cell? I've tried to set the edit flag to 9 but seems not work. I always get the "9" event when i perform a single click. I want to do a doSomething() when a double click occours on columns 0,1,2,3,4 only. Thank you in advance! expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIListViewEx.au3> Global $iGreen = "0x00FF00", $iRed = "0xFF0000" Global $sRet ; Create GUI $hGUI = GUICreate("My GUI", 700, 230, -1, -1, BitOR($WS_SIZEBOX, $WS_SYSMENU)) ; Create ListView For represent a db table with 6 column $idListview = GUICtrlCreateListView("C0|C1|C2|C3|C4|C5", 5, 5, 610, 180, BitOR($LVS_REPORT, $LVS_SHOWSELALWAYS, $WS_BORDER)) _GUICtrlListView_SetExtendedListViewStyle($idListview, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_HEADERDRAGDROP)) Global $dataPoolArray = retrieveData() ; THE DATAPOOL SIZE IS UNKNOWN A THIS POINT, IT COMES FROM DATABASE _GUICtrlListView_AddArray($idListview, $dataPoolArray) ; Initiate ListView = sort on column click - editable headers - header colours - user colours $iLVIndex_1 = _GUIListViewEx_Init($idListview, $dataPoolArray, 0, 0, True, 1 + 8 + 32) ; + 16 ; **** IF the last column of the row is '1' the background color must be $iGreen, else must be $iRed **** Local $dataPoolRowNum = UBound($dataPoolArray, $UBOUND_ROWS) ; Total number of rows. In this example it will be 10. Local $dataPoolColNum = UBound($dataPoolArray, $UBOUND_COLUMNS) ; Total number of columns. In this example it will be 20. ; Create colour array - 0-based to fit ListView content Global $aLVCol_1[$dataPoolRowNum][$dataPoolColNum] For $iRow = 0 To $dataPoolRowNum - 1 If $dataPoolArray[$iRow][5] = 1 Then ; Check the required column and fill colour array accordingly For $iCol = 0 To $dataPoolColNum - 1 $aLVCol_1[$iRow][$iCol] = ";" & $iGreen Next Else For $iCol = 0 To $dataPoolColNum - 1 $aLVCol_1[$iRow][$iCol] = ";" & $iRed Next EndIf Next ; Load colour array into ListView _GUIListViewEx_LoadColour($iLVIndex_1, $aLVCol_1) Local $j For $j = 0 To 4 _GUIListViewEx_SetEditStatus($iLVIndex_1, $j, 9, "doSomething()" ) ; <- PErsonalized function if double click this items Next _GUIListViewEx_SetEditStatus($iLVIndex_1, 5, 2,"1|0",1+2) ;~ If colours used then this function must be run BEFORE GUISetState _GUIListViewEx_MsgRegister() GUISetState() While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE ConsoleWrite("EXIT signal" & @CRLF) Exit EndSwitch $vRet = _GUIListViewEx_EventMonitor() If @error Then ConsoleWrite("Event error: " & @error) EndIf Switch @extended Case 0 ; No event detected Case 1 ;DOUBLE CLICK If $vRet = "" Then ConsoleWrite("Edit aborted" & @CRLF) Else ;_ArrayDisplay($vRet) Local $clickedRow = $vRet[1][0] Local $clickedColumn = $vRet[1][1] Local $oldValue = $vRet[1][2] Local $newValue = $vRet[1][3] ConsoleWrite("YOU DOUBLE CLICKED ROW " & $clickedRow & " ON COLUMN " & $clickedColumn & " old value " & $oldValue & "new value " & $newValue &@CRLF) PrintEntireRowValues($idListview, $clickedRow) ConsoleWrite(@CRLF) Local $c0 =_GUICtrlListView_GetItemText($idListview, $vRet[1][0]) ;updateC0onDB($newValue, $c0) If $newValue = '1' Then For $j = 0 To 5 _GUIListViewEx_SetColour($iLVIndex_1, ";" & $iGreen, $vRet[1][0], $j) Next Else For $j = 0 To 5 _GUIListViewEx_SetColour($iLVIndex_1, ";" & $iRed, $vRet[1][0], $j) Next EndIf ;~ ConsoleWrite($oldValue & " " & $newValue & @CRLF) EndIf Case 9 ; SINGLE CLICK Local $clickedRow = $vRet[1] Local $clickedColumn = $vRet[2] ConsoleWrite("SINGLECLICK ON ROW: " & $clickedRow & " ,COLUMN: " & $clickedColumn) PrintCellValue($idListview, $clickedRow,$clickedColumn) PrintEntireRowValues($idListview, $clickedRow) ConsoleWrite(@CRLF) EndSwitch WEnd Func PrintCellValue($aListView, $aRowIndex, $aRowColum) ConsoleWrite(" CELLVALUE: " & _GUICtrlListView_GetItemText($aListView, $aRowIndex, $aRowColum) ) EndFunc Func PrintEntireRowValues($aListView, $aRowIndex) Local $c0 =_GUICtrlListView_GetItemText($aListView, $aRowIndex) Local $c1 =_GUICtrlListView_GetItemText($aListView, $aRowIndex,1) Local $c2 =_GUICtrlListView_GetItemText($aListView, $aRowIndex,2) Local $c3 =_GUICtrlListView_GetItemText($aListView, $aRowIndex,3) Local $c4 =_GUICtrlListView_GetItemText($aListView, $aRowIndex,4) Local $c5 =_GUICtrlListView_GetItemText($aListView, $aRowIndex,5) ConsoleWrite(" ROW VALUE: " & $c0 & " " & $c1 & " " & $c2 & " " & $c3 & " " & $c4 & " " & $c5) EndFunc Func sayHello() ConsoleWrite("HELLO") EndFunc Func retrieveData() Local $array[2][6] = [['v00', 'v01', 'v02', 'v03', 'v04', '1'], ['v10', 'v11', 'v12', 'v13', 'v14', '0']] Return $array EndFunc ;==>retrieveData Link to comment Share on other sites More sharing options...
trn80 Posted December 6, 2019 Share Posted December 6, 2019 Please ignore the request i made before because I've solved the problem after reading all the pages in this thread. THe solution is pretty simple: expandcollapse popup; These variables stores the last clicked cell, will be renewed when a '9' event is detected Local $clickedRow Local $clickedColumn $vRet = _GUIListViewEx_EventMonitor() If @error Then If @error = 3 Then ConsoleWrite("Non-editable column" & getCellValue($idListview, $clickedRow,$clickedColumn) & @CRLF) ConsoleWrite("DOUBLECLICK ON ROW: " & $clickedRow & " ,COLUMN: " & $clickedColumn) Else ConsoleWrite("Event error: " & @error) EndIf EndIf Switch @extended Case 0 ; No event detected Case 1 ;DOUBLE CLICK If $vRet = "" Then ConsoleWrite("Edit aborted" & @CRLF) Else ;_ArrayDisplay($vRet) Local $clickedRow = $vRet[1][0] Local $clickedColumn = $vRet[1][1] Local $oldValue = $vRet[1][2] Local $newValue = $vRet[1][3] ConsoleWrite("YOU EDITED ROW " & $clickedRow & " ON COLUMN " & $clickedColumn & " old value " & $oldValue & "new value " & $newValue &@CRLF) PrintEntireRowValues($idListview, $clickedRow) ConsoleWrite(@CRLF) Local $c0 =_GUICtrlListView_GetItemText($idListview, $vRet[1][0]) ;updateC0onDB($newValue, $c0) If $newValue = '1' Then For $j = 0 To 5 _GUIListViewEx_SetColour($iLVIndex_1, ";" & $iGreen, $vRet[1][0], $j) Next Else For $j = 0 To 5 _GUIListViewEx_SetColour($iLVIndex_1, ";" & $iRed, $vRet[1][0], $j) Next EndIf ;~ ConsoleWrite($oldValue & " " & $newValue & @CRLF) EndIf Case 9 ; SINGLE CLICK $clickedRow = $vRet[1] $clickedColumn = $vRet[2] ConsoleWrite("SINGLECLICK ON ROW: " & $clickedRow & " ,COLUMN: " & $clickedColumn) PrintCellValue($idListview, $clickedRow,$clickedColumn) PrintEntireRowValues($idListview, $clickedRow) ConsoleWrite(@CRLF) EndSwitch Link to comment Share on other sites More sharing options...
abberration Posted February 28, 2020 Share Posted February 28, 2020 @Melba23 Once again you have solved a problem for me! I am writing a new program to automate some repetitive tasks and wanted to have dropdowns in a listview. It took me a couple hours of reading posts and your documentation, but I finally got it. Wow, I am always amazed at your work. Thank you for working so hard on this forum. 🍸 robertocm 1 Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 8, 2020 Author Moderators Share Posted March 8, 2020 (edited) Hi, It is with some embarrassment that I realise I never posted a modified UDF in response to this bug report - however, better late than never! Could @pixelsearch (or someone else if they have the time) please check this new version and confirm that it works for them - it obviously does for me! Thanks in advance, M23 Edited March 13, 2020 by Melba23 Deleted Beta code Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
pixelsearch Posted March 10, 2020 Share Posted March 10, 2020 On 3/8/2020 at 5:15 PM, Melba23 said: Could @pixelsearch (or someone else if they have the time) please check this new version... Hi Melba23 Sorry for not answering earlier as I'm not on the site as often as I used to be. Here are the results of the tests I just did : * The 1st bug report you mentioned (which concerned columns) has been solved with your fix from last Sunday (March 8th) . Now when we run example 6, tick "Col" radio button, then insert/delete columns as much as we want, no error appears after all columns have beed deleted : problem solved. * The 2nd bug report (which concerned rows) is still there. Run example 6, click 7 times on Del => error at 7th click (i.e after the 6 rows have been correctly deleted, a 7th click when there are no more visible rows generate the following error) Tests have been done in a folder named "Nouveau dossier" containing 2 files only : GLVEx_Example_6.au3 and your last GUIListViewEx_Test.au3 (renamed GUIListViewEx.au3) Good luck & fingers crossed Musashi 1 Link to comment Share on other sites More sharing options...
pixelsearch Posted March 11, 2020 Share Posted March 11, 2020 (edited) @Melba23 : I found a line in the UDF that could explain why there's a bug when we delete all rows : Func _GUIListViewEx_DeleteSpec($iLV_Index, $vRange = "") ... If UBound($hGLVEx_SrcHandle) = 1 Then Return SetError(3, 0, "") ... EndFunc ;==>_GUIListViewEx_DeleteSpec As $hGLVEx_SrcHandle is a Handle and not an Array, then the test will always be false. If we replace that line with : If UBound($aGLVEx_Data[$iLV_Index][2]) = 1 Then Return SetError(3, 0, "") _ArrayDisplay($aGLVEx_Data[$iLV_Index][2], "Del button has been pressed") ; debug Then deleting all visible 6 rows and pressing again the Del button won't generate any error... but problems won't all be solved. Please look at this : Precedent image is correct, Del button has been pressed once and Row 0 (col 0) is correct, indicating there are 6 visible rows in the listview (Deletion process will follow _ArrayDisplay) Precedent image doesn't seem correct, Del button has been pressed a 2nd time and Row 0 (col 0) indicates "-1" instead of 5, which will cause fatal problems much later when we will Insert/Delete rows/columns (tested) In case anyone wants to know what contains $aGLVEx_Data, then just add an _ArrayDisplay line here : Func _GUIListViewEx_Init(...) ... _ArrayDisplay($aGLVEx_Data, $aGLVEx_Data[0][0] & " listview(s) initiated") ; Return ListView index Return $iLV_Index EndFunc ;==>_GUIListViewEx_Init Hope this helps Edited March 11, 2020 by pixelsearch Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 11, 2020 Author Moderators Share Posted March 11, 2020 (edited) pixelsearch, You pinpointed the right place - brain fade on my part for checking the wrong variable! That section of the function should read as follows: ; Load active ListView details $hGLVEx_SrcHandle = $aGLVEx_Data[$iLV_Index][0] $cGLVEx_SrcID = $aGLVEx_Data[$iLV_Index][1] Local $fCheckBox = $aGLVEx_Data[$iLV_Index][6] ; Copy array for manipulation $aGLVEx_SrcArray = $aGLVEx_Data[$iLV_Index][2] If UBound($aGLVEx_SrcArray) = 1 Then ; Check for no rows to delete Return SetError(3, 0, "") EndIf Please try this version and see if I have managed to crack it this time. M23 Edited March 13, 2020 by Melba23 Deleted Beta code Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Musashi Posted March 11, 2020 Share Posted March 11, 2020 19 hours ago, pixelsearch said: Run example 6, click 7 times on Del => error at 7th click (i.e after the 6 rows have been correctly deleted, a 7th click when there are no more visible rows generate the following error) 42 minutes ago, Melba23 said: Please try this version and see if I have managed to crack it this time. The error described by @pixelsearch does no longer arise. So your fix seems to work . pixelsearch 1 "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
pixelsearch Posted March 11, 2020 Share Posted March 11, 2020 (edited) @Musashi : it's been a long time, thanks for the test ! @Melba23 : yes that issue is fixed but unfortunately we're not done. As I wrote in the second part of my comment (July 28, 2019) another issue is still pending : On 7/28/2019 at 5:07 AM, pixelsearch said: * Run the script, click on Col button radio, click on Del 4 times to delete the 4 visible columns, then : * Click on Row button radio, click one time on Ins (to insert a new row) and : Test done with the very last UDF you uploaded 3 hours ago. I'll try to investigate in case the problem isn't too hard to solve, fingers crossed. Edit (1h after) : If $aGLVEx_SrcArray[0][0] = 0 Then ... The preceding line generates an issue when the Array got no more columns in it. Maybe testing on [0][0] shouldn't be done when there are no more columns in the Array ? $iNb_col = Ubound($aGLVEx_SrcArray, 2) If @error Then Msgbox(0, "", "@error = " & @error) Precedent test will define $iNb_col to 0, with an error = 2 ("Dimension is invalid") in case you test Ubound after all columns have been deleted. My bad if precedent remarks are wrong. Edited March 11, 2020 by pixelsearch A quick thought on [0][0] Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 11, 2020 Author Moderators Share Posted March 11, 2020 pixelsearch, I see the problem. It happens because deleting all the columns removes the shadow array element holding the number of rows - not something I ever thought a user would need to do! It looks as if I need to use a separate variable to hold that value - I will try and work on it over the next few days. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 13, 2020 Author Moderators Share Posted March 13, 2020 (edited) Hi all, Try and break this new Beta! M23 Edited March 14, 2020 by Melba23 Removed Beta code Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
pixelsearch Posted March 14, 2020 Share Posted March 14, 2020 (edited) Hi Melba23, I just tried the last beta you uploaded 14 hours ago and got an error : As I clicked several times the 4 buttons Ins / Del / Insert Spec / Delete Spec (plus both radio buttons Row / Col) then I can't remember exactly how many times I clicked here & there. I'll try again, more carefully, to count how many clicks generate the error and which buttons are involved. Edited March 14, 2020 by pixelsearch typo Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 14, 2020 Author Moderators Share Posted March 14, 2020 (edited) pixelsearch, Why are you compiling the script each time? Please just run it from SciTE and then post the error line from the console - then we do not need all these large screenshots. M23 P.S. It also means you get a sensible line number to help me locate the line at which it failed. Edited March 14, 2020 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
pixelsearch Posted March 14, 2020 Share Posted March 14, 2020 5 hours ago, Melba23 said: pixelsearch, Why are you compiling the script each time? ... P.S. It also means you get a sensible line number to help me locate the line at which it failed. Who ever said I was compiling it ? I never compile anything so the error line number indicated in the picture is 100% accurate. Also having a screenshot is interesting, it allows to see how many rows/columns were visible when the error occured (amongst other things) To run the script, I Just double-click the .au3 file, from Windows Explorer, which launches the uncompiled script outside Scite. By the way... On 3/10/2020 at 2:44 PM, pixelsearch said: Tests have been done in a folder named "Nouveau dossier" containing 2 files only : GLVEx_Example_6.au3 and your last GUIListViewEx_Test.au3 (renamed GUIListViewEx.au3) Ok, this being explained, let's run the script from Scite (your wish) and do this simple thing : 1) One click over the Del button (it will delete 1 row, 5 still showing) 2) One click over any listview header => fatal error : >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GLVEx_Example_6.au3" "C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GUIListViewEx.au3" (5634) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: Local $aCheckedItems[$iItemCount + 1] = [0] Local $aCheckedItems[$iItemCount + 1] = [^ ERROR >Exit code: 1 Time: 7.76 And this will be my last error picture below (your wish) to show everybody that the accurate error line number 5634 is correctly indicated from Scite and outside Scite (if we run again the .au3 script outside Scite) : Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 14, 2020 Author Moderators Share Posted March 14, 2020 (edited) pixelsearch, Fixed that one - try again! M23 Edited March 15, 2020 by Melba23 Beta code removed Musashi 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
pixelsearch Posted March 14, 2020 Share Posted March 14, 2020 Hi Melba23, Right, that line you added in the new beta solved the last issue : Func __GUIListViewEx_Array_Delete(ByRef $avArray, $iIndex, $bDelCount = False) ... ; Do not overwrite count row If $iIndex = 0 Then $iIndex = 1 Only now, both pictures posted here appear correctly : * 1st picture still shows "6" in row 0, col 0 (correct) * 2nd picture now shows "5" in row 0, col 0 (correct) and not "-1" anymore Bravo for the quick fix Musashi 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now