Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm writing a batch file for a friend that will be used on a Win XP system, though I have Win 98. I'm new to batch so I would like to know if this file would work on a Win XP system:
@echo off
set /p user=Enter User Name >
set /p message=Enter Message >
set /p time=Repeat Infinintely? [Y/N] >
ECHO Sending message to %user%...
if %time%=="Y" GOTO INFINITE
if %time%=="y" GOTO INFINITE
if %time%=="N" GOTO ONCE
if %time%=="n" GOTO ONCE
:INFINITE
net send %user% %message%
GOTO INFINITE
:ONCE
net send %user% %message%
ECHO Message Sent
:ENDI want it to ask the user three things which will be used for a net send command: a user name to send to, a message to send and if it should be sent infinitely (used for a prank he wants to pull). Please tell me if this file will work and if there are any ways to compact it please tell me.
Also, if possible, is there me to make it so IF the person wants to repeat it infinitely, it asks how often the person wants to repeat the net send command (in seconds). And if the number is 0 or blank repeat with out any delay.
Thank You
-Alex

These may help .
BatchRun , batchfile maker .
http://www.outertech.com/index.php?_charisma_page=downloads&PHPSESSID=0007473406038b22ae9ba7767d46cc7a
http://www.outertech.com/
===========================================
BatchMaker
http://freebask.homestead.com/batchmaker.html
BatchMaker is an application that allows you to build lists of filenames,
format them, and then copy them to the clipboard or save them to a text
file. Lists can be compiled via the common file dialog, the common select folder dialog, drag and drop, the Add Disks dialog, or the command-line. They can also be opened from ASCII text files.==========================================
The Wizard's Apprentice
http://wizapp.sourceforge.net/
Batch files still are a good way to get things done. As long as the things are simple, a batch file can be exactly the right way to do it: easily written, portable, and no need to install anything to get it to work. There is one big shortcoming of batchfiles though: interactivety. There is hardly a nice way to ask the user questions. In the old days, in MSDOS, there
was no way at all to ask questions; then came CHOICE, a very primitive utility to ask Yes/No kind of questions and get an error level back. And that was it.Now there is the Wizard's Apprentice. It will allow you to ask questions from a batch file, using Windows dialog boxes in the so-called Wizard style: large dialogs asking one question at a time, with a Back button, a Next button and a Cancel button. With a few common batch techniques, the Wizard's Apprentice will allow you to create wizards with style!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |