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 / Saving problems

Author
Message
Stinger
20
Years of Service
User Offline
Joined: 3rd Jul 2004
Location:
Posted: 3rd Jul 2004 15:01
ok ive got this code here:
Print " ===FORGETFUL MOM'S MOVIE MATE==="
Sleep 1000
Print " Press any key to continue"
suspend for key
cls
Print " ===FORGETFUL MOM'S MOVIE MATE==="
Print "Step 1: ENTER MOVIE INFO"
Sleep 500
rem ask user for movie info
input "^Enter Name of Movie: ";name$
Sleep 500
input "^Enter Date MM/DD/YY: ";date$
Sleep 500
input "^Enter Type: ";type$
Sleep 500
input "^Enter Optional Info: ";info$
Sleep 500
rem confirm info
Print "Step 2: CONFIRM INFO"
Sleep 200
Print "^Movie: ",name$
Sleep 200
Print "^Date: ",date$
Sleep 200
Print "^Type: ",type$
Sleep 200
Print "^Optional Info: ",info$
Sleep 500
Print "Y=yes, N=no"<-----------and right here is where im stuck....i dont know how to when y is pressed it saves the info that was typed in to a place where it can later be opened with this program i am making and be viewed, and when i hit N for the programm to restart (this is only my second day on DBC so i dont know much)....if you could help that would be awsome... thx
AluminumPork
21
Years of Service
User Offline
Joined: 28th Oct 2003
Location: Duluth, MN, USA
Posted: 4th Jul 2004 18:50 Edited at: 4th Jul 2004 18:53
Hmmm... pretty simple really.

If you're only going to remember one movie at a time, just do this:

This will save the info.


To load it:


That should just about do it, hope I helped!

[edit]
Just realized you may have been asking how to capture whether or not a key has been pressed.



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

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Jul 2004 22:09 Edited at: 4th Jul 2004 22:09
Try something like this instead:



It removes all those gotos that we are all told we shouldn't use

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk

Login to post a reply

Server time is: 2024-11-26 23:23:23
Your offset time is: 2024-11-26 23:23:23