No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

34 líneas
1.4KB

  1. '=======================================================================================================================
  2. ' WScript compatibility shim for AxonASP CLI (axonasp-cli -m vbscript)
  3. '=======================================================================================================================
  4. ' AxonASP has no WScript host object. This defines the parts the generator scripts use:
  5. ' WScript.Arguments (Count, Item) - read from environment variables ARG1..ARG9 (set by scripts\gen.cmd)
  6. ' WScript.ScriptFullName - a path inside scripts/ (only its folder is used)
  7. ' WScript.Echo / WScript.Quit - Quit stops the script (exit code is not propagated by the CLI)
  8. ' Loaded by each generator with: ExecuteGlobal <contents of _cli.vbs>
  9. Class WScript_Shim
  10. Public Arguments
  11. Public ScriptFullName
  12. Private Sub Class_Initialize()
  13. Dim sh, i, v
  14. Set sh = CreateObject("WScript.Shell")
  15. Set Arguments = CreateObject("Scripting.Dictionary")
  16. For i = 1 To 9
  17. v = sh.ExpandEnvironmentStrings("%ARG" & i & "%")
  18. If v = "%ARG" & i & "%" Then Exit For
  19. Arguments.Add Arguments.Count, v
  20. Next
  21. ScriptFullName = Server.MapPath("/scripts/generator.vbs")
  22. End Sub
  23. Public Sub Echo(s)
  24. Response.Write s & vbCrLf
  25. End Sub
  26. Public Sub Quit(code)
  27. Response.End
  28. End Sub
  29. End Class
  30. Dim WScript : Set WScript = New WScript_Shim

Powered by TurnKey Linux.