Jump to content

Cant load items from listview after copy any item


Verssuss
 Share

Recommended Posts

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

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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...