Reinhardt1julian Posted February 14, 2013 Posted February 14, 2013 How can i save a listview with all the items (for example in a txt file), and when the program starts next time it should read this file. And if this file is not there, it should create it.
Moderators Melba23 Posted February 14, 2013 Moderators Posted February 14, 2013 Reinhardt1julian, So you want to know how to read each item in a ListView and write it to a file? And then read a file and write the contents to a ListView? What functions have you found in the Help file that might work? What code have you tried? Have you noticed a certain theme in my last few repies? Stop expecting us to provide you with absolutely everything and start doing some work for yourself. Clear? 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
Reinhardt1julian Posted February 14, 2013 Author Posted February 14, 2013 my problem is, that GUICtrlRead won't read the whole list view
Moderators Melba23 Posted February 14, 2013 Moderators Posted February 14, 2013 Reinhardt1julian,So you perhaps need to look at the _GUIListView UDF. There you will find _GUICtrlListView_GetItemTextString which reads a whole line from a ListView. You will of course have to loop through all the lines - _GUICtrlListView_GetItemCount might be useful to find out how many there are. Are you getting the message about the Help file yet - please do start reading it. 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
Reinhardt1julian Posted February 14, 2013 Author Posted February 14, 2013 I cand find the Solution in the help file, so how can is set which line _GUICtrlListView_GetItemTextString should read?
Reinhardt1julian Posted February 14, 2013 Author Posted February 14, 2013 (edited) Nope, still cant find anything, is it even possibel? (I hope im not too annoying :/) Edited February 14, 2013 by Reinhardt1julian
AZJIO Posted February 14, 2013 Posted February 14, 2013 Export to an array. Try instead of exporting to an array of strings to write to a file_GUICtrlListView_GetAllTextToArray My other projects or all
Reinhardt1julian Posted February 14, 2013 Author Posted February 14, 2013 Ok. Now i got the code. Let's say i have this in the txt file. cd|ab gh|ef Now i want to import it, cd (column 1 row 1), ab (column 2 row 1), ...
Moderators Melba23 Posted February 14, 2013 Moderators Posted February 14, 2013 Reinhardt1julian,I hope im not too annoyingWell, you have certainly exhausted my well of patience for today - and quite possibly longer. 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
Reinhardt1julian Posted February 14, 2013 Author Posted February 14, 2013 Ok, that i have something goot to say, I figured everything out! No more questions yet!
AZJIO Posted February 14, 2013 Posted February 14, 2013 Reinhardt1julian,Ok. Now i got the code. Let's say i have this in the txt file. Why do you earlier did not write it? This forces the other to make monkey work. - try to use the correct separator (delimiter). My other projects or all
Reinhardt1julian Posted February 14, 2013 Author Posted February 14, 2013 Why do you earlier did not write it?.I'm sorry, but i got it 10 seconds before i wrote it. So i clouldn't write it earlier :/
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