Need help with windows batch scripting to create game for blind child


  1. Posts : 4
    windows 7
       #1

    Need help with windows batch scripting to create game for blind child


    Hi I'm new to windows batch scripting and am in the process of trying to create a game for a blind child.
    But there are a few things i don't know how to do.
    and in order to learn how to do them if you could help me
    with the code in the following batch file



    @echo off
    echo please enter name
    set /p name-field=
    echo please enter address
    set /p address-field=
    echo please enter city
    set /p city-field=
    echo please enter state
    set /p state-field=
    echo please enter zip code
    set /p zip field=

    What I need to know is what to add to this batch file
    that will do the following:

    1. Create a comma delimited text file called address-book.txt
    which will contain the values entered in the batch file
    with all the fields on one line separated by commas.
    2. And then i will need to know how to read that
    comma delimited file into another program that will
    extract the fields from the file and place them into
    variables, without the commas.

    Anyone who can help me with this, i would appreciate it very much. Thanks.
    Ed
      My Computer


  2. Posts : 93
    Windows 7 Professional 32bit
       #2

    Try using python instead.
    Pretty simple language and a lot more powerful than batch.

    A great learning website is www.codeacademy.com

    Also this program that you're importing the CSV file in to, which program is it?
      My Computer


  3. Posts : 4
    windows 7
    Thread Starter
       #3

    python?


    I don't have the time to learn another language with interpreters and all that. I know batch scripting enough to do most of what i want to do. it's just that i need to learn a few more things that i don't know how to do.
      My Computer


  4. Posts : 93
    Windows 7 Professional 32bit
       #4

    Okay, but so far all you've shown me is that you know how to print to the terminal. Seriously, batch is one of the worst languages for doing this kind of thing.


    Still, what do you mean by the second question? Is this a program your building yourself? Is it one that's already made?
      My Computer


  5. Posts : 4
    windows 7
    Thread Starter
       #5

    python


    Okay, i took some time and watched a tutorial on python. It seems to be quite similar to batch script, so ill take your word for it that it's more powerful. So then tell me how you would do what i want to do in python please.

    That is, how do I create the comma delimited file for the example i gave.

    and to answer your second question, i will be building a program to read in the comma delimited file and want to know how to extract the data from the file to variables in the second program without the commas.

    And btw thank you very much for the quick responses :)
      My Computer


  6. Posts : 4
    windows 7
    Thread Starter
       #6

    codeacademy


    I tried to vie the site you recommended and it'd down for maintenance. When was the last time you used that site ?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:56.
Find Us