Sign in to follow this  
Followers 0
Ace08

Edit a Single Line in a text file

6 posts in this topic

#1 ·  Posted (edited)

Hi guys i am working on a simple program that mimics a database program, but all the datas are stored in a notepad mainly a .txt file i have almost all the working buttons exept for the edit button and i can't seem to figure out how to pick up a single line in that textfile and edit then save it... btw these datas are also present in a listbox i can get the data from the listbox but how to link that to a textbox... sorry for asking but i am realy having a hard time thinking on how it could be done.... any help would be appreciated....

here is a copy of what i have done so far and sorry again because the code are very measy

Database.au3

Tomorrow i'll try to do this one again but for now i would like to sleep....(Need some rest :graduated:)

Edited by Ace08

Work smarter not harder.My First Posted Script: DataBase

Share this post


Link to post
Share on other sites



Why not editing directly within the GUI and save it afterwards to the text file? How it can work? Just have a look here -> CSV-Editor

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

Why not editing directly within the GUI and save it afterwards to the text file? How it can work? Just have a look here -> CSV-Editor

Thanks a lot UEZ i'll look into it and hopefuly finished this one this evening :graduated:


Work smarter not harder.My First Posted Script: DataBase

Share this post


Link to post
Share on other sites

oh i just remembered if the user edits the contents of the GUI then save it later would that affect the speed of saving the process? i mean basicaly what will happen is the user edits the record the script gets the contents of the listview then place it in a text file i've thought of this one too but as the records increase will the script able to maintain its speed when editing?


Work smarter not harder.My First Posted Script: DataBase

Share this post


Link to post
Share on other sites

Uhm hi guys got the editing part working(Thanks UEZ :D)

Now i have another problem, i've been trying to solve this for almost 3days :graduated:......

what i have now is a GUI that has 3 buttons namely View, New, and Delete. Got this buttons working but the delete (or save has a problem) when i tried to delete the last record then add a new record the script works but when i tried to delete records from the middle then add another record the list view would only show the "ID" field but when i looked inside the notepad the records i added are there.... i was thinking of just refreshing the main GUI(the one holding the listview) but i dont know how to refresh the GUI... Maybe some ideas?...Appreciate your help

here is are the code just in case someone needs them, sorry but its realy measy :(

DataBase.au3


Work smarter not harder.My First Posted Script: DataBase

Share this post


Link to post
Share on other sites

Hi Ace

did you ever sort your problems out with your database program?


Drunken Frat-Boy Monkey Garbage

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