home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Tools - Objects / Virtual User 1.0b5 / Virtual User / MPW Scripts / Multi_vu < prev    next >
Encoding:
Text File  |  1990-10-05  |  1.3 KB  |  66 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        multiVU
  3. #
  4. #    Contains:    This script can be used to create the command line for executing 
  5. #                VU, interactively (via Commando) for multiple targets/scripts.
  6. #                This script will not execute VU but will generate the command line
  7. #                for you to execute.
  8. #
  9. #    Written by:    P Nagarajan
  10. #
  11. #    Copyright:    © 1989 by Apple Computer, Inc., all rights reserved.
  12. #
  13. #    Change History:
  14. #
  15. #         6/5/89       naga        creation 
  16. #
  17. #    To Do:
  18. #
  19.  
  20. set exit 0
  21. set newcommand 'VU '
  22. set total_targets "`request "how many targets do you plan to run against?"`"
  23. exit 1 if {total_targets} > 12
  24. exit 1 if {total_targets} < 1
  25. set target_num 1
  26. loop
  27.     Break if {target_num} > {total_targets}
  28.     set str "`commando VU`"
  29.     set skip 1
  30.     for item in {str}
  31.         if {skip}
  32.             set skip 0
  33.             continue
  34.         end
  35.         if "{item}" =~ /-(≈)®1/ 
  36.             set newcommand "{newcommand} -{®1}{target_num}"
  37.         else
  38.             set newcommand "{newcommand} ∂'{item}∂'"
  39.         end #if
  40.     end #for
  41.     evaluate target_num = {target_num} + 1
  42. end #loop
  43. set skip 1
  44. set arg_seen 0
  45. for item in {newcommand}
  46.     if {skip}
  47.         echo -n "{item}"
  48.         set skip 0
  49.         continue
  50.     end
  51.     if "{item}" =~ /-(≈)/ 
  52.         if {arg_seen}
  53.             echo -n " ∂∂∂n"
  54.             set delta 1
  55.         end
  56.         echo -n "∂t{item}"
  57.         set arg_seen 1
  58.     else
  59.         set arg_seen 0
  60.         echo -n "∂t∂'{item}∂' ∂∂∂n"
  61.         set delta 1
  62.     end #if
  63. end #for
  64. if {delta} 
  65.     replace \∂∂\  '' "{active}"
  66. end