Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch serial system, errors.  (Read 7994 times)

0 Members and 1 Guest are viewing this topic.

GuruGary



    Adviser
    Re: Batch serial system, errors.
    « Reply #15 on: January 16, 2009, 11:33:40 PM »
    Still need help.
    I agree that this seems kind of pointless because it is so easy to get around. But you should be able to do something like this for the serial part of your code:
    Code: [Select]
    @echo off
    setlocal
    set ValidSerial=3612-3472-631
    SET /P name= Enter your NAME here:

    if exist cache.txt (
    echo Found cached serial code ...
    findstr.exe /b /e "%ValidSerial%" cache.txt>NUL
    if not errorlevel 1 goto :load
    echo Bad cached serial code
    echo Please enter a valid serial code.
    )
    :EnterSerial
    SET /P serial= Enter your SERIAL CODE here:
    if {%serial%}=={%ValidSerial%} goto :CacheSerial
    echo You entered a bad serial code. Please try again.
    goto :EnterSerial

    :CacheSerial
    echo %serial%>cache.txt
    goto :load

    :load
    echo Serial code is valid.
    echo Hello, %name%.
    echo Enter more code here for what you want your program to do.
       

    whitekidney

      Topic Starter


      Rookie

      Re: Batch serial system, errors.
      « Reply #16 on: January 26, 2009, 04:11:05 PM »
      Oh god thanks it works.

      Is there any way to make more serials out of it ?
      It seems i can only use 1 serial code, if i do
      Set Validserial=1234-1234-123
      Set Validserial=1111-1111-111


      The last one will only work

      whitekidney

        Topic Starter


        Rookie

        Re: Batch serial system, errors.
        « Reply #17 on: January 26, 2009, 10:50:21 PM »
        Bump!

        Dias de verano

        • Guest
        Re: Batch serial system, errors.
        « Reply #18 on: January 27, 2009, 12:26:16 AM »
        Bump!

        Around here, bumping earns you -500 priority points, which means I won't answer for 3 days.

        Don't bump. It's not a good idea.



        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: Batch serial system, errors.
        « Reply #19 on: January 27, 2009, 03:48:51 AM »
        Bump!

        Around here, bumping earns you -500 priority points, which means I won't answer for 3 days.

        Not withstanding the fact you weren't going to answer anyway, right?
        I was trying to dereference Null Pointers before it was cool.

        whitekidney

          Topic Starter


          Rookie

          Re: Batch serial system, errors.
          « Reply #20 on: January 27, 2009, 05:09:09 AM »
          *censored* boob.. ;)
          o Well.. anyone got a solution ?

          devcom



            Apprentice

            Thanked: 37
            Re: Batch serial system, errors.
            « Reply #21 on: January 27, 2009, 05:52:44 AM »
            Bump!

            Around here, bumping earns you -500 priority points, which means I won't answer for 3 days.

            Don't bump. It's not a good idea.

            lol  ;D

            Anyway try to use for loop
            Download: Choice.exe

            whitekidney

              Topic Starter


              Rookie

              Re: Batch serial system, errors.
              « Reply #22 on: January 28, 2009, 02:35:35 AM »
              Come on, i need help. :x

              Dias de verano

              • Guest
              Re: Batch serial system, errors.
              « Reply #23 on: January 28, 2009, 06:46:57 AM »

              fireballs



                Apprentice

              • Code:Terminal
              • Thanked: 3
                Re: Batch serial system, errors.
                « Reply #24 on: January 28, 2009, 07:13:55 AM »
                Come on, i need help. :x

                6 days now  ::)

                You're onto a winner WhiteKidney, getting Dias to not burn you for 6 days is surely a good thing.

                Also Devcom has already pointed you in the right direction...
                Anyway try to use for loop

                And another thing, just wondering if you're aware of what your name means?

                FB
                Next time google it.

                whitekidney

                  Topic Starter


                  Rookie

                  Re: Batch serial system, errors.
                  « Reply #25 on: January 28, 2009, 02:22:36 PM »
                  ive tried so many diffrent things

                  anyone got any code for it ? :S

                  devcom



                    Apprentice

                    Thanked: 37
                    Re: Batch serial system, errors.
                    « Reply #26 on: January 28, 2009, 02:38:33 PM »
                    9 days ?  ;D
                    Download: Choice.exe

                    Dias de verano

                    • Guest
                    Re: Batch serial system, errors.
                    « Reply #27 on: January 28, 2009, 03:36:19 PM »

                    Jacob



                      Hopeful

                      Thanked: 1
                      • Experience: Expert
                      • OS: Windows XP
                      Re: Batch serial system, errors.
                      « Reply #28 on: January 29, 2009, 09:16:24 AM »
                      This kid just doesn't learn.

                      whitekidney

                        Topic Starter


                        Rookie

                        Re: Batch serial system, errors.
                        « Reply #29 on: February 06, 2009, 03:41:44 AM »
                        Erm, i almost got it, but still errors.

                        Anyone got any example code ?