Verssuss Posted March 29, 2020 Author Share Posted March 29, 2020 here is short version of code with same error #include "GUIListViewEx.au3" $GUI = GUICreate("gui", 670, 600,@DesktopWidth - (670 + 1), 0) GUISetState() $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) HotKeySet("{F1}", "_go") HotKeySet("{F2}", "_go1") While 1 Sleep(100) WEnd Func _go() Global $vData[6] = ["Name1 "] _GUIListViewEx_Insert($vData) EndFunc Func _go1() Global $vData[6] = ["Name2 "] _GUIListViewEx_Insert($vData) EndFunc error come when i hold f2 or f3 and fastest way to get error is hold f2 for ~5 sec then press f3 with f2 holded Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 29, 2020 Moderators Share Posted March 29, 2020 Verssuss, OK, I can see that holding down a HotKey will crash the UDF - and this is because the new items are being entered too quickly for the UDF to keep up. So I suggest clearing the HotKey while in the called function and then reset it as you leave. This works for me: Func _go() HotKeySet("{F1}") Global $vData[6] = ["Name1 " & @SEC] _GUIListViewEx_Insert($vData) Sleep(100) HotKeySet("{F1}", "_go") EndFunc You may have to adjust the Sleep value depending on your machine. 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 i did exactly same what u do now but it work only for 1 hotkey. also after evry time i press f2 full list just flashing(refreshing?) it must be like this ? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 30, 2020 Moderators Share Posted March 30, 2020 Verssuss, It works for both HotKeys if you code them correctly: Func _go() HotKeySet("{F1}") Global $vData[6] = ["Name1 " & @SEC] _GUIListViewEx_Insert($vData) Sleep(100) HotKeySet("{F1}", "_go") EndFunc Func _go1() HotKeySet("{F2}") Global $vData[6] = ["Name2 " & @SEC] _GUIListViewEx_Insert($vData) Sleep(100) HotKeySet("{F2}", "_go1") EndFunc 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 30, 2020 Author Share Posted March 30, 2020 its impossible to use for me anyway. after i add 1k new items refreshing all items take to long they all refreshing with orginal listwiev it take always 0.1 sec even i have 10k items i just want add 1 item at end of list why all items have to be refreshed ? but in orgin i cant drag move items like in your udf or i can find that function ?? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 30, 2020 Moderators Share Posted March 30, 2020 Verssuss, Quote 10k items My UDF is not designed to deal with ListViews that size - it does all its work in Autoit so, given the speed restrictions that this implies, asking it to deal with that many items causes problems. I have no idea if there is another UDF to allow for ListView manipulation as I have always found mine quite capable of coping with the size of datasets that I have used. 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 30, 2020 Author Share Posted March 30, 2020 its pretty sure your udf have lot of function and make many scripts easier to do but all i need is move selected items to any part of listwiev. if that possible to separete this function from all code or meybe u knowany function that let move items. i find many scripts that let u move any items by buttons but i need also drag move. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 30, 2020 Moderators Share Posted March 30, 2020 Verssuss, If you want to strip code out of the UDF to just leave some basic functions then feel free to do so. The code is pretty modular and so it should not be too hard a job - certainly removing anything to do with colour, single cell selection, or header manipulation will massively increase the speed of execution. 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 31, 2020 Moderators Share Posted March 31, 2020 Verssuss, Here is a stripped version of the UDF which just allows item movement and edit - give it a try and see if it is fast enough for your needs. And just why do you need 10k+ items in a ListView anyway? LarsJ has this UDF to deal with ListViews of that size and above which might be of interest to you. 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