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

Author Topic: Help!!!  (Read 2057 times)

0 Members and 1 Guest are viewing this topic.

ogelami

    Topic Starter


    Beginner
  • Ogelami
    Help!!!
    « on: February 11, 2007, 05:15:33 AM »
    I want to make a valueable string some thing like this:


    [highlight]set wada==%wada% + 1
    if %wada%==10 goto xoq[/highlight]
    09314M!

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: Help!!!
    « Reply #1 on: February 11, 2007, 05:56:25 AM »
    I went back through your last 20 posts and not one of them mentioned your OS. Your record continues!

    Code: [Select]
    set /a wada==%wada% + 1
    if %wada%==10 goto xoq

    This may or may not work on your machine. The /a switch is sensitive to the OS.

     8-)
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    ogelami

      Topic Starter


      Beginner
    • Ogelami
      Re: Help!!!
      « Reply #2 on: February 11, 2007, 06:22:23 AM »
      thank you GOD!(sidewinder)
      09314M!

      ogelami

        Topic Starter


        Beginner
      • Ogelami
        Re: Help!!!
        « Reply #3 on: February 11, 2007, 06:29:39 AM »
        sorry it doesnt work maybe ive done some thing wrong have a look:

        [highlight]@echo off
        set /a "wada"=="1"
        :1337
        set /a "wada"=="%wada%" + 1
        pause
        if %wada%==10 goto mesa
        pause
        ping 1.1.1.1 -l 1 -w 500 -n 1 >NUl
        goto 1337

        :mesa
        msg * yay!
        ping 1.1.1.1 -l 1 -w 5000 -n 1 >NUl[/highlight]
        09314M!

        Sidewinder



          Guru

          Thanked: 139
        • Experience: Familiar
        • OS: Windows 10
        Re: Help!!!
        « Reply #4 on: February 11, 2007, 07:03:30 AM »
        Your code seems to have morphed into something new. The /a switch is used to do arithmetic on a set statement.

        Code: [Select]
        @echo off
        set wada=1
        :1337
        set /a wada=%wada% + 1
        pause
        if %wada%==10 goto mesa
        pause
        ping 1.1.1.1 -l 1 -w 500 -n 1 >NUl
        goto 1337
         
        :mesa
        msg * yay!
        ping 1.1.1.1 -l 1 -w 5000 -n 1 >NUl

        You don't need all those pause statements and why the ping after the msg? Just curious. ;)
        The true sign of intelligence is not knowledge but imagination.

        -- Albert Einstein