Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Rembering Program - You Will Get What I Mean If You Come In!

Author
Message
Lance Lumpy
20
Years of Service
User Offline
Joined: 21st Feb 2004
Location: On My Computer
Posted: 22nd Feb 2004 21:15
How Do I Create A Program That Remembers User Information that they typed in (using the input command) even when they close the program down. i would be really thankful if someone would tell me!
Lance

Support Everton FC - They're The Best!
AluminumPork
21
Years of Service
User Offline
Joined: 28th Oct 2003
Location: Duluth, MN, USA
Posted: 22nd Feb 2004 21:24 Edited at: 22nd Feb 2004 21:27
Save it to a file.

Try this:


and then to read your information:


You must make sure that the file doesn't already exist though, otherwise the command will fail, so check for it's existance using
file exist()

So:



And there you go.

P4 2.4Ghz HT, 512MB RAM, ATI Radeon 9600 128MB, 19" Viewsonic, 80GB HD

Lance Lumpy
20
Years of Service
User Offline
Joined: 21st Feb 2004
Location: On My Computer
Posted: 22nd Feb 2004 21:43
Thanks, It Works

Support Everton FC - They're The Best!
Jiffy
20
Years of Service
User Offline
Joined: 5th Mar 2004
Location: Hiding in the bushes in your backyard
Posted: 6th Mar 2004 06:18
I've got a question. Will this mean you can only have one thing saved, or can you make many save files (I can't test it because my DarkBASIC hasn't come yet, so im searching around for ideas)?

P.S. Dont try to go to my website, i closed it down and am starting a new one.

Last night I was looking up at the stars and said "Where the hell is my roof?!"
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 6th Mar 2004 06:34
Until you close a file, you can keep writing to it, like a log book. Closing the file before you exit the program is important. At some point you will want to disable the escape key and catch it via scankey so that you can always include the close command when shutting down the program.
--
TAZ

Login to post a reply

Server time is: 2024-11-26 07:52:02
Your offset time is: 2024-11-26 07:52:02