Sign in to follow this  
Followers 0
careca

ListView Quantity cap

7 posts in this topic

Hey ppl, having a problem where im using this:

Func LoadList()
$ReadSection = IniReadSection($iFile, 'PlayList')
If @error Then
MsgBox(64, 'Info', 'Nothing to load! This means it couldn't find the ini file, please save a playlist first.')
Else
For $i = 1 To $ReadSection[0][0]
$Numbers = $i
$array4 = StringLen($ReadSection[$i][1])
$array3 = StringInStr($ReadSection[$i][1], "\", 0, -1)
$array2 = $array4 - $array3
$arrayL = StringTrimRight($ReadSection[$i][1], $array2)
$arrayR = StringTrimLeft($ReadSection[$i][1], $array3)
GUICtrlCreateListViewItem($Numbers & '|' & $arrayL & '|' & $arrayR, $cListView)
GUICtrlSetState(-1, $GUI_FOCUS)
Next
$ListClick = $Id
GUICtrlSetState($ListClick, $GUI_FOCUS)
EndIf
EndFunc ;==>LoadList

to populate the list, and it stops as down as the scroll bar can go...if you know what i mean.

So the list is 3000+ items, and it will only go as far as 390. but, when i import folders and subfolders, it will populate the list with all files! :S


Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

 

Share this post


Link to post
Share on other sites



Ok, got it, says in the help file, regarding inireadsection:

"Only the first 32767 chars are read for legacy reasons.", and that corresponds to the last item in the file, how can i make it read more?


Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

 

Share this post


Link to post
Share on other sites

careca,

You could try SmOke_N's Ini*Ex UDF. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

Besides the size limit, ini file operations offer a really bad performance imho. For large volume operations I would always advice to switch to using sqlite.

Share this post


Link to post
Share on other sites

Thanks guys, the thing is, i this is a mp3 player, and sometimes it can happen that one can save and load a really big list of files, all mp3 files,

i have some 3000+ and some people have more, the player cant have this limitation.

Gonna check that UDF, and sqlite to see what suits best my needs.

Thank you.

Greetz


Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

 

Share this post


Link to post
Share on other sites

You could do what I did, on one of my projects, and use a flat file and read it using a loop and filereadline.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

That is what i've done

FileOpen($pfile, 0)
$Read = FileRead($pfile)
If @error Then
MsgBox(64, 'Info', 'Nothing to load! This means it couldnt find the file, please save a playlist')
Else
$ListLen = StringLen($Read)
For $i = 1 To $ListLen
$Line = $i
$Read = FileReadLine($pfile, $Line)
If $Read = Not '' Then
$Numbers = $i
$StrLen = StringLen($Read)
$StrL = StringInStr($Read, "", 0, -1)
$TrR = $StrLen - $StrL
$Folder = StringTrimRight($Read, $TrR)
$Track = StringTrimLeft($Read, $StrL)
GUICtrlCreateListViewItem($Numbers & '|' & $Folder & '|' & $Track, $cListView)
ToolTip('Loading track nº: ' & $Numbers)
Else
ToolTip('')
TrayTip('Info', 'Finished Loading the playlist!', '', 1)
ExitLoop
EndIf
Next
Edited by careca

Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0