Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
835 B

  1. '
  2. ' test1.vbs
  3. '
  4. ' test string manipulation
  5. '
  6. Dim WshSHell
  7. Dim DevConStrings
  8. Dim String
  9. Dim Count
  10. Dim i
  11. set WshShell = WScript.CreateObject("WScript.Shell")
  12. set DevConStrings = WScript.CreateObject("DevCon.Strings")
  13. DevConStrings.Add "Alpha"
  14. DevConStrings.Add "Beta"
  15. DevConStrings.Add "Gamma"
  16. DevConStrings.Add "Delta"
  17. Count = DevConStrings.Count
  18. Wscript.Echo "Count="+CStr(Count)
  19. FOR EACH String In DevConStrings
  20. WScript.Echo String
  21. NEXT
  22. DevConStrings.Remove 2
  23. Count = DevConStrings.Count
  24. Wscript.Echo "Count="+CStr(Count)
  25. For i = 1 To Count
  26. String = DevConStrings(i)
  27. WScript.Echo String
  28. NEXT
  29. DevConStrings.Insert 2,"Beta2"
  30. Count = DevConStrings.Count
  31. Wscript.Echo "Count="+CStr(Count)
  32. For i = 1 To Count
  33. String = DevConStrings(i)
  34. WScript.Echo String
  35. NEXT