Jump to content

Fast Sort with Icons in ListView


randallc
 Share

Recommended Posts

Hi,

Please tell me if this works for you;

Fast sort in LstView, based on 2PaulIA and @gafrost modification...

Or has this been done before?

Or does it not work?

Please let me know ; I've had computers all over not working..

[14 secs on slow machine to write ListView; 1.7 secs to sort with icons!; I am impressed with the efforts of these guys for Autot to be able to do it;

Best, Randall]

;; ExIcons7.au3 0_17 
#include "_GUILVSort7.au3"
Local $ar_Files[1], $s_TryFile = "C:\Program Files\AutoIt3\Include";
;~ $s_TryFile=@ScriptDir
Local $listview, $searchGUI = GUICreate("Directory to Sort; " & $s_TryFile, 810, 623, (@DesktopWidth - 800) / 2, (@DesktopHeight - 600) / 2, $WS_MAXIMIZEBOX + $WS_MINIMIZEBOX + $WS_SIZEBOX + $WS_SYSMENU)
;~ _GUISetCheckBoxesPresent ($searchGUI, $listview, 1, 0);******************************
_GUISetCheckBoxesPresent ($searchGUI, $listview, 1, 1, 7);******************************
_FileSetIconDefault ($listview, -1, ".au3")
$listview = _GUICtrlCreateListViewIndexed ("File   |Time     |Size|Ext ", 10, 10, 790, 530, $LVS_EX_GRIDLINES, BitOR($LVS_EX_GRIDLINES, $LVS_EX_HEADERDRAGDROP, $LVS_EX_FULLROWSELECT, $LVS_EX_REGIONAL));Drag&Drop Columns
If FileExists($s_TryFile) Then $ar_Files = __FileListToArray ($s_TryFile)
GUISetState()
;~ BlockInput(1)
;~ _Lock()
_GUICtrlListViewSetColumnWidth($listview, 0, 300)
_GUICtrlListViewHideColumn($listview, _GUICtrlListViewGetSubItemsCount($listview) - 2)
$timerstamp1 = TimerInit()
For $i = 0 To UBound($ar_Files) - 15;0;;0;
    if $i = 40 then _Lock()
    _GUICtrlCreateListViewItem (StringMid($ar_Files[$i], 12), $listview, @ScriptDir & "\", 0, 1)
Next
_GUICtrlListViewHideColumn($listview, _GUICtrlListViewGetSubItemsCount($listview) - 2)
;~ BlockInput(0)
_ResetLock()
ConsoleWrite("="&round(TimerDiff($timerstamp1))&@LF)
Do
    $msgG = GUIGetMsg()
    _GetLVInfo ($msgG)
    Sleep(10)
Until $msgG = $GUI_EVENT_CLOSE ;Then ExitLoop
EDIT - newer version works? Randall Edited by randallc
Link to comment
Share on other sites

  • 1 month later...

Did you try to run this? You can't set GuiOnEventMode and then use a GuiGetMsg() loop to operate the GUI, and you are using $listview as the ControlID for functions BEFORE you create the listview.

:whistle:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Did you try to run this? You can't set GuiOnEventMode and then use a GuiGetMsg() loop to operate the GUI, and you are using $listview as the ControlID for functions BEFORE you create the listview.

:whistle:

Hi,

At least someone eventually replied 3 months later!

1. If it doesn't work for you, try the newer version; old one not workng

2. The only function it is used in is one which needs to set some functions in the included script; and it has already been declared, and needs n returns before the listview is called;

try the newer version, as the old one non-compiled may not work on newer AutoIt versions..

Best Randall

** Woops, sorry; it must have been an old file.

Try below

[Thanks;

btw, I see this doesn't work in 3.2.5.0 beta!** Working again from 3.2.5.4 on.....

Best, randall]

Edited by randallc
Link to comment
Share on other sites

Hi

PS - seeing my script won't work in new AutoIt version [OK 3.2.4.9, not in 3.2.5.0], I have hunted down the original author and script; - eltorro

Edit In Place Listview (multi-column), Combination of old script, new code allows one to edit listview data.Best, Randall

Link to comment
Share on other sites

  • 1 month later...

Hi

PS - seeing my script won't work in new AutoIt version [OK 3.2.4.9, not in 3.2.5.0], I have hunted down the original author and script; - eltorro

Edit In Place Listview (multi-column), Combination of old script, new code allows one to edit listview data.Best, Randall

Hi, this is working again;]** Working again from 3.2.5.4 on.....

shows LV with;

1. fast sort including checkboxes, icons. [without Register sort]

2. Icons on other columns than first c/o gafrost method.

3. double-click edits subitems, c/o eltorro method.

Best, randall

Link to comment
Share on other sites

really really excellent.

for fast sort in listview, i've used ADORecordSet, but i don't know if it's faster or lower that your method :)

BTW, really good fusions of different new methods posted around the forum.

keep up the good work

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Link to comment
Share on other sites

for fast sort in listview, i've used ADORecordSet, but i don't know if it's faster or lower that your method :)

OK!

1. Thanks; I had forgoten to check that method for sort/ subsort and speed; good idea, and I will look again.

2. I have not yet here incorporated the even faster GUI funcs of my newest versions, which are as quick as sorting with icons in Explororer, I think; demo in link to SearchMiner; are you able to see if that runs for you? [works fast by only updating icons at writing or updating elements showing on current screen or nearby]

3. I meant to ask if you found a workaround for the "lastfiles" script and problems with dos [a. bug in dirs with spaces, b. not reading European characters. ]? - did you re-write it or still use it? [searchMiner does not use DOS Dir command; only AutoIt]

Best, Randall

Link to comment
Share on other sites

OK!

1. Thanks; I had forgoten to check that method for sort/ subsort and speed; good idea, and I will look again.

ADORecordSet is really, really powerful. I think it's better to use it because you don't have to call vbscript for sort, but the main problem is that the tab still resides in memory, but it's the main advantage too !

2. I have not yet here incorporated the even faster GUI funcs of my newest versions, which are as quick as sorting with icons in Explororer, I think; demo in link to SearchMiner; are you able to see if that runs for you? [works fast by only updating icons at writing or updating elements showing on current screen or nearby]

works perfectly !

3. I meant to ask if you found a workaround for the "lastfiles" script and problems with dos [a. bug in dirs with spaces, b. not reading European characters. ]? - did you re-write it or still use it? [searchMiner does not use DOS Dir command; only AutoIt]

Best, Randall

the last version works fine but the main bug is the vbscript that sometimes bugs, and i don't know why

it's been a while since the last time i've used it.

for ADORecordSet, i can provide you the script i've developed. It's called "WMI File explorer".

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
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...