Jump to content

ListView Quantity cap


careca
 Share

Recommended Posts

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

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

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

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

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

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.

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

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

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
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

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

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

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

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

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.

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

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

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

  • Moderators

careca,

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

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

Link to comment
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

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

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

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

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

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.

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

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

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
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

Link to comment
Share on other sites

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

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

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

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

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

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.

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

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

IUIAutomation - Topic with framework and examples

Au3Record.exe

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