pixelsearch Posted March 17, 2020 Share Posted March 17, 2020 New test using last beta's (UDF & example), both files unrenamed from now on : 1) Select 1st visible line in LV 2) Click 6 times the "Del" button : >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GUIListViewEx_Test_Script.au3" "C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GUIListViewEx_Test.au3" (1453) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: If $vRet[0][0] <= $aSplit[2] Then If ^ ERROR >Exit code: 1 Time: 9.165 You can generate the same error doing this : 1) Clic "Del" 5 times 2) Select the only remaining line 3) Clic "Del" once, when only 1 selected line is remaining. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 17, 2020 Author Moderators Share Posted March 17, 2020 pixelsearch, You do love deleting everything in the ListView! Here is a version with some modified checks for an empty ListView after deletion. M23 GUIListViewEx_Test.au3 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 17, 2020 Share Posted March 17, 2020 (edited) Concerning GUIListViewEx_Test_Script, I couldn't generate an error with the last UDF beta, Bravo Melba23 Edited March 17, 2020 by pixelsearch Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 18, 2020 Author Moderators Share Posted March 18, 2020 pixelsearch, Delighted to hear it. I will do some tidying of the code and then release a new version. 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 18, 2020 Author Moderators Share Posted March 18, 2020 [BUGFIX VERSION] - 18 Mar 20 Fixed: Several bugs which appeared when all rows or columns were deleted - thanks to pixelsearch for his diligence in finding them. Changed: To make it easier for the user, the _GUIListViewEx_ContextPos will now return an error if the right-click was not on an item - Example 6 amended to reflect this. New zip file with UDF, examples and guide in the first post of the thread. 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...
robertocm Posted March 18, 2020 Share Posted March 18, 2020 (edited) On 3/14/2020 at 7:01 PM, Melba23 said: And as we in Spain are now virtually confined to our houses for the next 2 weeks (at least) thanks to Covid-19 Remember you have good friends in Spain, @pixelsearch, Thanks!, and let me take your phrase: On 3/16/2020 at 7:11 AM, pixelsearch said: It's the least we can do for a person like you who help us so much Edited March 18, 2020 by robertocm Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 18, 2020 Author Moderators Share Posted March 18, 2020 robertocm, Muchas gracias para tus palabras, mi amigo. M23 robertocm 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...
langthang084 Posted April 17, 2020 Share Posted April 17, 2020 thanks for your UDF, but I get an error when loading Listview from the save file which has more than 6 column. It show an error: --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop "H:\Marketting\Sharing Online Tool\GUIListViewEx.au3" (871) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $aHdrData[0][$i] = $aHeader[$i][0] ^ ERROR Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 17, 2020 Author Moderators Share Posted April 17, 2020 langthang084, Please post a copy of the saved file and a reproducer script which fails when you try to reload from it. Otherwise I can do nothing. 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...
langthang084 Posted April 17, 2020 Share Posted April 17, 2020 Here's it! GLVEx_Example_6.au3 Save.lvs Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 17, 2020 Author Moderators Share Posted April 17, 2020 langthang084, I found the problem and I believe I have fixed it - try this version and see if works for you now: GUIListViewEx_Load.au3 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...
langthang084 Posted April 18, 2020 Share Posted April 18, 2020 Yeah!! Thank you very much! It works normally Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 18, 2020 Author Moderators Share Posted April 18, 2020 langthang084, Thanks for the confirmation - i will release a bugfix version this weekend. M23 langthang084 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...
Moderators Melba23 Posted April 18, 2020 Author Moderators Share Posted April 18, 2020 [BUGFIX VERSION] - 18 Apr 20 Fixed: A bug in the _Load function - thanks to langthang084 for finding it. Added: _EventMonitor now also returns a value in @extended for a column resize. New zip in the first post. M23 langthang084 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...
seadoggie01 Posted May 4, 2020 Share Posted May 4, 2020 Found a bug or an error in the documentation... _GUIListViewEx_ReadToArray states that it returns either a 2D array or an empty string, but it will never return an empty string. If there is no data, it will return an array like [[0]] All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 4, 2020 Author Moderators Share Posted May 4, 2020 seadoggie01, Thanks for that. I seem to remember that I had to change the "empty ListView" return to prevent a crash elsewhere. I will fix it in the next release. M23 seadoggie01 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...
DrJohn Posted May 29, 2020 Share Posted May 29, 2020 Hi all. Just starting to dip my toes in the GuiListViewEx water. So far so good. Before I go too far down this path, I just wanted to confirm that what I think is true must be true: Once having created a ListView with _GUICtrlListView_Create(), and then having initialized it with _GUIListViewEx_Init() -- one can still call the distributed UDF functions (i.e., the UDF functions distributed with AutoIt -- _GUICtrlListView_GetSelectedIndices(), _GUICtrlListView_GetItem(), _GUICtrlListView_ClickItem(), and the like), intermingled with the GUIListViewEx calls. And when using the distributed UDF functions, one continues to pass the the handle that _GUICtrlListView_Create() returned. But when calling the GUIListViewEx functions, one passes the index value that _GUIListViewEx_Init() returned? I think this must be right; just wanted to make sure. Thanks! /John Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 29, 2020 Author Moderators Share Posted May 29, 2020 DrJohn, Why not post this in the dedicated GUIListViewEx UDF thread as it is specific to the UDF? Anyway, you are pretty close. Any changes to the ListView must be made using the UDF functions - so that the UDF can track the changes and keep its internal shadow arrays up-to-date. Using the GUICtrlListView_* functions should work - but be careful if you get into any of the esoteric UDF functionality involving colour and/or single cell selection as the UDF takes over a lot of the standard internal ListView functions and the "selected" highlight is run by the UDF and not Windows. Hence the need for the _GUIListViewEx_GetLastSelItem (Get last selected item in active or specified ListView) function in the UDF as the standard functions will not return sensible values. Normally this is not a problem, but you need to be aware of it. And if you do suddenly find the need for a new function because the standard one does not work I am usually happy to see if I can oblige. 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...
DrJohn Posted May 29, 2020 Share Posted May 29, 2020 1 hour ago, Melba23 said: Why not post this in the dedicated GUIListViewEx UDF thread as it is specific to the UDF? 😬 Didn't notice there was one ... 1 hour ago, Melba23 said: Anyway, you are pretty close. Any changes to the ListView must be made using the UDF functions - so that the UDF can track the changes and keep its internal shadow arrays up-to-date. Using the GUICtrlListView_* functions should work - but be careful if you get into any of the esoteric UDF functionality involving colour and/or single cell selection as the UDF takes over a lot of the standard internal ListView functions and the "selected" highlight is run by the UDF and not Windows. Hence the need for the _GUIListViewEx_GetLastSelItem (Get last selected item in active or specified ListView) function in the UDF as the standard functions will not return sensible values. Normally this is not a problem, but you need to be aware of it. That makes sense. I hadn't planned on doing single-cell selection; color possibly. And I do have some code that both queries and changes the selected item (I'm endeavoring to put this in place of existing ListView code, as I imagine is often the case). I'll be on the lookout for UDF functions to use instead of _GUICtrlListView_* functions. 1 hour ago, Melba23 said: And if you do suddenly find the need for a new function because the standard one does not work I am usually happy to see if I can oblige. Better try to get my head around what's there already first. 🙂 Thanks again! /John Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 29, 2020 Author Moderators Share Posted May 29, 2020 DrJohn, Quote I do have some code that both queries and changes the selected item If you want to change the content, you must use a UDF function - _GUIListViewEx_ChangeItem (Programatic change of specified ListView item) seems a likely candidate. 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...
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