views:

1534

answers:

3

Is it possible to open Microsoft Script Editor, then from within the editor open a .vbs (VBScript) file, then run/debug it?

I know I can use the command-line cscript (filename) //X to launch the file, allowing me to select Microsoft Script Editor as the debugger, but I want to do everything from within Microsoft Script Editor.

I am aware of a number of freeware and commercial editors that more or less will do what I want in a more or less integrated fashion, but this question is about Microsoft Script Editor specifically.

Is Microsoft Script Editor as a stand-alone application only useful for editing/debugging scripts that are part of a web page?

A: 

Your script has to be part of a web page. It would be nice if the MS Script Editor lived up to its name but it doesn't. You can make a simple HTML page to include your vbs file and use that in the Script Editor to launch your script. The page can be as simple as this:

<script language="vbscript" src="file:///C:\myscript.vbs">
</script>
DMKing
A: 

You can run it directly from the "wiev/Open with" menu. Choose the "wscript" from the list and press the "open" button.

You can edit and debug stand-alone scripts without html files, but can't create it. If you choose "file/new" menu, you can create only html and text file. Choose the text file, and save it with ".vbs" extension. Close and reopen it (use the "open with - HTML/XML editor" if you set other default) and now work the intellisense.

A: 

Thanks ZED. I had the same question!