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

Author Topic: delay set /p command ?  (Read 2490 times)

0 Members and 1 Guest are viewing this topic.

diablo416

    Topic Starter


    Hopeful
    delay set /p command ?
    « on: November 29, 2008, 12:14:47 PM »
    i need to use set /p with a timer?? , i tryed choice.exe and it isnt what im looking for unless i can have it put it into a variable instead of just continuing..

    i tryed

    ping -n 3 127.0.0.1>nul|set /p r=Input:

    it doesnt work, any other ways of doing this?

    thanks in advance

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: delay set /p command ?
    « Reply #1 on: November 29, 2008, 04:40:07 PM »
    You need to explain this:
    Quote
    ping -n 3 127.0.0.1>nul|set /p r=Input:
    Why would you want to use ping to NOT give something
     the the set command?

    Dias de verano

    • Guest
    Re: delay set /p command ?
    « Reply #2 on: November 29, 2008, 04:57:39 PM »
    He knows that ping can be used to create a delay and presumably thinks that some kind of "batch magic" will cause ping to effect a timeout with set /p


    diablo416

      Topic Starter


      Hopeful
      Re: delay set /p command ?
      « Reply #3 on: November 30, 2008, 11:55:19 AM »
      well the "batch magic" does make set /p work as a timer just not set the variable like it should

      iONik



        Beginner

        Re: delay set /p command ?
        « Reply #4 on: November 30, 2008, 03:59:30 PM »
        for a delay of 60 seconds:

        Code: [Select]
        PING -n 61 127.0.0.1>nul
        Or download http://www.computerhope.com/download/utility/sleep.exe and place it in C:\WINDOWS\System32 folder..


        diablo416

          Topic Starter


          Hopeful
          Re: delay set /p command ?
          « Reply #5 on: December 01, 2008, 06:35:07 AM »
          thanks, I already understand how to cause a delay.. im looking to cause a delay within set /p
          similar to how the choice command automatically selects c if the set timer runs out.. without a selection being made

          Dias de verano

          • Guest
          Re: delay set /p command ?
          « Reply #6 on: December 01, 2008, 08:02:40 AM »
          im looking to cause a delay within set /p
          similar to how the choice command automatically selects c if the set timer runs out.. without a selection being made

          You cannot do this with set /p