VBScript interactive shell

One of the things I really love about Python is the interactive shell; when I think “how do I do X in Python?” then I can just drop to a shell, type “python“, and then try stuff out. I can’t do that in VBScript, and it annoys me. So: an interactive VBScript shell. do while true wscript.stdout.write(“>>> “) ln = wscript.stdin.readline if lcase(trim(ln)) = “exit” then exit do on error resume next err.clear execute ln if err.number <> 0 then wscript.echo(err.description) on error goto 0 loop Note that this is totally daft and it doesn’t do anythng complex at all. No line continuations. No cleverness. But it helps me to answer the sorts of questions I come up with a lot, like “does a string with length \> 0 evaluate to True?” without having to create a .vbs file and run it. You need to run this from the command line with cscript.

More in the discussion (powered by webmentions)

  • (no mentions, yet.)