Verssuss Posted March 27, 2020 Share Posted March 27, 2020 hello my problem looks like i do Case $menu_file_save $file_save = FileSaveDialog("Choose a filename.", "", "Data (*.lvs)", $FD_PATHMUSTEXIST) _GUIListViewEx_SaveListView($iLV_Index, $file_save) after i open program again i use this to load my saved items Case $menu_file_load Local $file_open = FileOpenDialog("Choose Scheme", @ScriptDir & "\", "Data (*.lvs)", $FD_FILEMUSTEXIST) _GUIListViewEx_LoadListView($iLV_Index, $file_open) it work almost good but all items are in list by this function Case $button_copy _GUICtrlListView_CopyItems($ListView, $ListView) they not save and they not come back after i load all items come excepted that one what i copy i use this #include "GUIListViewEx.au3" plz help me Link to comment Share on other sites More sharing options...
Nine Posted March 27, 2020 Share Posted March 27, 2020 Provide a runable script. And use this tool, when you post code. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Verssuss Posted March 27, 2020 Author Share Posted March 27, 2020 i have +4k lines in my code i just need fix that items on which I used the functions _GUICtrlListView_CopyItems($ListView, $ListView) they wont read after u use Local $file_open = FileOpenDialog("Choose Scheme", @ScriptDir & "\", "Data (*.lvs)", $FD_FILEMUSTEXIST) _GUIListViewEx_LoadListView($iLV_Index, $file_open) Link to comment Share on other sites More sharing options...
Nine Posted March 27, 2020 Share Posted March 27, 2020 Ok since you are there can you help me with this line of code, it is not working as expected : Send (Sleep (Send ("x"))) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Verssuss Posted March 28, 2020 Author Share Posted March 28, 2020 (edited) here is my code expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include "GUIListViewEx.au3" #include <Array.au3> ; Just for display in example #include <GUIConstants.au3> #include <ButtonConstants.au3> #include <GuiListView.au3> ;~ #include <ListView.au3> #include <GuiListBox.au3> #include <GuiImageList.au3> #include <SendMessage.au3> #include <ScreenCapture.au3> #include <Misc.au3> #include <GuiEdit.au3> #include <EditConstants.au3> #include <WinAPI.au3> #include <File.au3> #include <AutoItConstants.au3> $width = 670 $gui_title = "gui" $GUI = GUICreate($gui_title, 670, 600,@DesktopWidth - ($width + 1), 0) GUISetState() $menu_file = GUICtrlCreateMenu("File") $menu_file_save = GUICtrlCreateMenuItem("Save Settings", $menu_file) $menu_file_load = GUICtrlCreateMenuItem("Load Settings", $menu_file) $button_copy = GUICtrlCreateButton("COPY", 480, 220, 50, 25) $button_up = GUICtrlCreateButton("UP", 480, 330, 50, 25) $button_down = GUICtrlCreateButton("DOWN", 480, 360, 50, 25) $button_del_selected = GUICtrlCreateButton("DEL", 480, 390, 50, 25) $button_add = GUICtrlCreateButton("ADD", 480, 510, 50, 25) _GUIListViewEx_MsgRegister() $ListView = GUICtrlCreateListView("111111111111|2|3|4|5|6|7|8", 10, 200, 450, 300, $LVS_SHOWSELALWAYS) $iLV_Index = _GUIListViewEx_Init($ListView, "", 0, 0, True, 1 + 2 + 8) _GUIListViewEx_SetEditStatus($iLV_Index, "0;1;2;3;4;5") _GUICtrlListView_SetExtendedListViewStyle($ListView, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES)) _GUICtrlListView_SetColumnWidth($ListView, 7, 0) While 1 ;~ Sleep(10) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $menu_file_save $file_save = FileSaveDialog("Choose a filename.", "", "Data (*.lvs)", $FD_PATHMUSTEXIST) _GUIListViewEx_SaveListView($iLV_Index, $file_save) Case $menu_file_load Local $file_open = FileOpenDialog("Choose Scheme", @ScriptDir & "\", "Data (*.lvs)", $FD_FILEMUSTEXIST) _GUIListViewEx_LoadListView($iLV_Index, $file_open) Case $button_del_selected _GUIListViewEx_Delete() Case $button_up _GUIListViewEx_SetActive($iLV_Index) _GUIListViewEx_Up() Case $button_down _GUIListViewEx_SetActive($iLV_Index) _GUIListViewEx_Down() Case $button_copy _GUICtrlListView_CopyItems($ListView, $ListView) Case $button_add _go() EndSwitch WEnd Func _go() Global $vData[6] = ["Name1 "] _GUIListViewEx_Insert($vData) EndFunc so press button add few times then select any item and copy it then save file then del all items and load file again. copied items wont load Edited March 28, 2020 by Verssuss Link to comment Share on other sites More sharing options...
Nine Posted March 28, 2020 Share Posted March 28, 2020 Thanks for making this snippet. It greatly helps us to understand what is the issue. So I tested your code and the function _GUIListViewEx_LoadListView is crashing. Since it is @Melba23 UDF, and the UDF is not trivial, I will let him see what is going on. Good luck. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 28, 2020 Moderators Share Posted March 28, 2020 Verssuss, You are using a non-UDF function to add items to the ListView (_GUICtrlListView_CopyItems). Because of this the UDF does not know that these items have been added and so any further manipulation of the ListView with the UDF will almost certainly end in tears as the UDF's internal array will no longer match the actual content. If you use the UDF you MUST use it to do ALL manipulation of the ListView content so that it can keep up with the actual content. So this works for me: Case $button_copy ;_GUICtrlListView_CopyItems($ListView, $ListView) $vData = _GUICtrlListView_GetItemTextString($ListView) _GUIListViewEx_Insert($vData) All good now? 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...
Verssuss Posted March 29, 2020 Author Share Posted March 29, 2020 not exactly. now u can copy only single item and in back function i was abble to hold ctrl and select as many item i want and copy them all now if u dont even select any item it just insert empty line to my listwiew. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 29, 2020 Moderators Share Posted March 29, 2020 Verssuss, Case $button_copy ;_GUICtrlListView_CopyItems($ListView, $ListView) $aSelected = _GUICtrlListView_GetSelectedIndices($ListView, True) If $aSelected[0] <> 0 Then For $i = $aSelected[0] To 1 Step -1 $vData = _GUICtrlListView_GetItemTextString($ListView, $aSelected[$i]) _GUIListViewEx_Insert($vData) Next EndIf M23 Skysnake 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...
Verssuss Posted March 29, 2020 Author Share Posted March 29, 2020 (edited) Thanks M23 Perfect how can i mark solved ? Edited March 29, 2020 by Verssuss Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 29, 2020 Moderators Share Posted March 29, 2020 Verssuss, Delighted I could help. Just edit the first post and change the title if you really feel the need to add anything. 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...
Verssuss Posted March 29, 2020 Author Share Posted March 29, 2020 no i dont need that but i have new problem with that UDF expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include "GUIListViewEx.au3" #include <Array.au3> ; Just for display in example #include <GUIConstants.au3> #include <ButtonConstants.au3> #include <GuiListView.au3> ;~ #include <ListView.au3> #include <GuiListBox.au3> #include <GuiImageList.au3> #include <SendMessage.au3> #include <ScreenCapture.au3> #include <Misc.au3> #include <GuiEdit.au3> #include <EditConstants.au3> #include <WinAPI.au3> #include <File.au3> #include <AutoItConstants.au3> $width = 670 $gui_title = "gui" $GUI = GUICreate($gui_title, 670, 600,@DesktopWidth - ($width + 1), 0) GUISetState() $menu_file = GUICtrlCreateMenu("File") $menu_file_save = GUICtrlCreateMenuItem("Save Settings", $menu_file) $menu_file_load = GUICtrlCreateMenuItem("Load Settings", $menu_file) $button_copy = GUICtrlCreateButton("COPY", 480, 220, 50, 25) $button_up = GUICtrlCreateButton("UP", 480, 330, 50, 25) $button_down = GUICtrlCreateButton("DOWN", 480, 360, 50, 25) $button_del_selected = GUICtrlCreateButton("DEL", 480, 390, 50, 25) $button_add = GUICtrlCreateButton("ADD", 480, 510, 50, 25) _GUIListViewEx_MsgRegister() $ListView = GUICtrlCreateListView("111111111111|2|3|4|5|6|7|8", 10, 200, 450, 300, $LVS_SHOWSELALWAYS) $iLV_Index = _GUIListViewEx_Init($ListView, "", 0, 0, True, 1 + 2 + 8) _GUIListViewEx_SetEditStatus($iLV_Index, "0;1;2;3;4;5") _GUICtrlListView_SetExtendedListViewStyle($ListView, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES)) _GUICtrlListView_SetColumnWidth($ListView, 7, 0) HotKeySet("{F1}", "_go") HotKeySet("{F2}", "_go1") While 1 ;~ Sleep(10) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $menu_file_save $file_save = FileSaveDialog("Choose a filename.", "", "Data (*.lvs)", $FD_PATHMUSTEXIST) _GUIListViewEx_SaveListView($iLV_Index, $file_save) Case $menu_file_load Local $file_open = FileOpenDialog("Choose Scheme", @ScriptDir & "\", "Data (*.lvs)", $FD_FILEMUSTEXIST) _GUIListViewEx_LoadListView($iLV_Index, $file_open) Case $button_del_selected _GUIListViewEx_Delete() Case $button_up _GUIListViewEx_SetActive($iLV_Index) _GUIListViewEx_Up() Case $button_down _GUIListViewEx_SetActive($iLV_Index) _GUIListViewEx_Down() Case $button_copy _GUICtrlListView_CopyItems($ListView, $ListView) Case $button_add _go() EndSwitch WEnd Func _go() Global $vData[6] = ["Name1 "] _GUIListViewEx_Insert($vData) EndFunc Func _go1() Global $vData[6] = ["Name2 "] _GUIListViewEx_Insert($vData) EndFunc here error code "C:\Users\verss\OneDrive\Pulpit\AUTOIT\GUIListViewEx.au3" (1354) : ==> Subscript used on non-accessible variable.: Local $iMax_Row = $aGLVEx_SrcArray[0][0] Local $iMax_Row = $aGLVEx_SrcArray^ ERROR it happend after i press few times F1 and F2. what im doing wrong ? it looks like listwiev not refresh all items before next come. it just looks like that Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 29, 2020 Moderators Share Posted March 29, 2020 Verssuss, And as you have not changed this function in your script: Case $button_copy _GUICtrlListView_CopyItems($ListView, $ListView) I am not in the least surprised. Change the function to that I posted earlier and try again. 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...
Verssuss Posted March 29, 2020 Author Share Posted March 29, 2020 this function working great i already tested just not posted it. and the error I'm talking about has nothing to do with the copy function Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 29, 2020 Moderators Share Posted March 29, 2020 Verssuss, Well, I can press FI & F2 multiple times in that script without problem. Can you be more specific about exactly what you do. 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...
Verssuss Posted March 29, 2020 Author Share Posted March 29, 2020 try meybe press f1 and f2 same time few times it shows u. listwiev no time for refresh i think Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 29, 2020 Moderators Share Posted March 29, 2020 Verssuss, I can press both keys together (although I think it is a very bad idea) multiple times without 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...
Verssuss Posted March 29, 2020 Author Share Posted March 29, 2020 (edited) that error in console say nothing ?? i use this Title .........: GUIListViewEx ; AutoIt Version : 3.3.10 + ; Language ......: English even when i hold f1 OR f2 it crash with same error C:\Users\verss\OneDrive\Pulpit\AUTOIT\GUIListViewEx.au3" (1354) : ==> Subscript used on non-accessible variable.: Local $iMax_Row = $aGLVEx_SrcArray[0][0] Local $iMax_Row = $aGLVEx_SrcArray^ ERROR Edited March 29, 2020 by Verssuss Link to comment Share on other sites More sharing options...
Danp2 Posted March 29, 2020 Share Posted March 29, 2020 Have you tried with the latest version of Autoit (3.3.14.5)? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Verssuss Posted March 29, 2020 Author Share Posted March 29, 2020 (edited) i use this help > help f1 v3.3.14.5 ©1999-2018 Jonathan Bennett & AutoIt Team help > about SCIte SciTE Version 4.1.2 Feb 13 2019 23:07:51 idk what one is right Edited March 29, 2020 by Verssuss 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