careca Posted December 16, 2012 Posted December 16, 2012 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
careca Posted December 16, 2012 Author Posted December 16, 2012 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
Moderators Melba23 Posted December 16, 2012 Moderators Posted December 16, 2012 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 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
KaFu Posted December 16, 2012 Posted December 16, 2012 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. OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
careca Posted December 16, 2012 Author Posted December 16, 2012 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
BrewManNH Posted December 17, 2012 Posted December 17, 2012 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 GudeHow 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
careca Posted December 17, 2012 Author Posted December 17, 2012 (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 December 17, 2012 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
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