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)
|