1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Big Problem Please Help

Discussion in 'Support' started by Roxide, Mar 5, 2010.

  1. Roxide

    Joined:
    Mar 1, 2010
    Messages:
    2
    Likes Received:
    0
    Sorry if it's hard to follow it's 2:30 and I've been working for about 30 Hours on the program and just got snagged about 30 mins ago on this.

    I am currently in the progress of creating a program that will monitor the ins and outs of golf carts. for instance. When a cart is givin out I will enter the cart number and enter a 1 for out or 0 if it comes in. I also have it set so I can view the status of all the carts at one time. Here is the coding.
    To set up the table I used the Set /U C1=0
    Set /U C2=0
    etc...
    To edit I used ESET /U C1=0 and edit accordingly to out 1 or in 0

    To display I have it set at
    If %C1 = 0 echo Available
    If %C1 = 1 echo In Use

    Now the problem I have is; when I run to view the list. Lets say I change C1 to 1 so it is in use. When I pull up the display it still says 0 until I exit the whole program and start again. Then it changes.

    My question is what do I need to do to update without exiting?
    Clear Ram? etc... or A code.
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,129
    Likes Received:
    33
    Why "/U"? That puts the variable into the registry. How about just plain ESET
    C1 (or SET C1). That puts the variable into the current environment, which is
    readily available to to the program.

    On Fri, 05 Mar 2010 02:25:18 -0500, Roxide <> wrote:

    |Sorry if it's hard to follow it's 2:30 and I've been working for about 30 Hours on the program and just got snagged about 30 mins ago on this.
    |
    |I am currently in the progress of creating a program that will monitor the ins and outs of golf carts. for instance. When a cart is givin out I will enter the cart number and enter a 1 for out or 0 if it comes in. I also have it set so I can view the status of all the carts at one time. Here is the coding.
    |To set up the table I used the Set /U C1=0
    | Set /U C2=0
    | etc...
    |To edit I used ESET /U C1=0 and edit accordingly to out 1 or in 0
    |
    |To display I have it set at
    |If %C1 = 0 echo Available
    |If %C1 = 1 echo In Use
    |
    |Now the problem I have is; when I run to view the list. Lets say I change C1 to 1 so it is in use. When I pull up the display it still says 0 until I exit the whole program and start again. Then it changes.
    |
    |My question is what do I need to do to update without exiting?
    |Clear Ram? etc... or A code.
    |
    |
    |
    |
    --
    - Vince
     
  3. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,203
    Likes Received:
    11
    If your desire is to persist the status in the registry, then using /U
    makes sense. Just add the /E switch as well and your current environment
    will also be updated.

    If the data does not need to be persisted, then just use SET without any
    switches.

    -Scott

    vefatica <> wrote on 03/05/2010 09:28:55 AM:


    justplain ESET

    which is

    this.

     

Share This Page