TIP: Click on subject to list as thread! ANSI
echo: qedit
to: ALL
from: KYLE WATKINS
date: 1997-06-27 08:50:00
subject: RE: Running and setting the DOS() functi08:50:5006/27/97

From: Kyle Watkins 
>> I have a macro which takes a list of NT stations and performs operations
>> ("ping" etc) on each and writes the results on the line next to the
>> station name. I thought it would be a good idea to include a menu option
>> to add an "on the fly" command that could be excuted against the list.
>>  Example:
>> String Run_This[75]
>> ASK("Enter the command to run against each station", Run_This)
>> DOS(Run_This)
>> What I would like is to enter the following into the ASK :
>>          "Copy \\MAIN_SERVER\C$\The_DIR\*.EXE    \\" +  STATION +
>> "\C$\MY_DIR"
>> I need station to be reevaluated each time it "pulls" a new station
>> name.
>> Even though the "ASK" is entered before the macro starts "pulling" the
>> station names from the list.
>> In  dBASE/Clipper  this would be done with    DOS( &RUN_THIS)
>> The &  reevaluates the VAR each time.  Is there a way in SAL ????
Hi Dom,
Let me know if I've got this wrong, but I *think* you are 
just wanting to replace STATION, in this example, with each 
name in your list.  If that is the case, and you want your 
macro to be generic, just come up with your own keywords, 
and replace YOUR KEYWORD with the appropriate name from the 
list before you pass the string to the DOS command.
An example (From your example):
In the Ask prompt type:
 Copy \\MAIN_SERVER\C$\The_DIR\*.EXE    \\&STATION&\C$\MY_DIR
then replace the &STATION& portion of the string with a 
name from your list (using string manipulation) and then 
send the modified string to the DOS command.
If this is what you want, and need help for manipulating
the string, just let me know.
Kyle Watkins (SemWare Support)
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.