Programming: The Microsoft Script Editor

MSE EditorThe ‘Microsoft Script Editor’ (MSE) program is not a very well advertised application out of the suite of programs supplied in MS Office 2003.

Previously before I found about MSE’s existence, I used to code with an application called HTML-Kit to do my HTML and VBS application development. Although not a bad program, it had stability problems when saving files and would often trash the one I was working on.

MSE has got the following useful features;

  • IntelliSense code completion,
  • Good integration with script debugging in IE, Wscript and Cscript.

It unfortunately needs some configuration and registry editing to get the best out of it. Here is a collections of what I’ve found by googling about.

Installing (Finding) the MSE editor application

If you do a full install of MS Office 2003, you should find the application file at the following location. If not, run Office 2003 setup again and add ‘HTML Source Editing’ under the {Office Tools} installation category.

“C:\Program Files\Microsoft Office\OFFICE11\MSE7.EXE”

Best to make a short cut to this and place it on your desktop. Microsoft normally expects the user to start this application in MS Word {Tools/Macro/Microsoft Script Editor}. That’s dumb, it deserves its own link.

Enabling Just-In-Time debugging

In Internet Explorer (IE7) under {Tools/Internet Options/Advanced tab}, you can clear the checkbox under {browsing/Disable script debugging (Internet Explorer)}. It’s normally disabled by default to make life easier for web surfing where most users are not into debugging faulty things like:

IE Debug message

Though this may now drive you mad for your own IE web surfing. There is a solution for this – surf with Firefox instead 😉

In the MSE application, set {Tools/Options} as following.
Just-In-Time debugging options in MSE

When your application crashes at a faulting line, or code execution comes across a breakpoint that you have set through MSE, you’ll be placed back into the editor with the line highlighted in yellow. If you have programmed before in VB/VBA or similar, you’ll be familiar in what you can do here – single step, step over, watch variables – it’s a lifesaver 🙂

Debugging WSH and VBS scripts

The environment is set up by default to debug scripts running inside the Internet Explorer process. However, you can choose to use the wscript.exe and cscript.exe interpreters by selecting “view/open with” and adding those alternative choices to use instead.

For instance, add the command line ‘wscript.exe //x’ with a friendly name of ‘wscript (start in debugger)’ – and ‘open’ the application from this dialog rather than clicking the run button on the toolbar (which targets IE).

Finding more information

There are lots of other websites and blogs about this tool. Here is one

2 Responses to Programming: The Microsoft Script Editor

  1. url verkorter…

    […]Programming: The Microsoft Script Editor « Adrian Online[…]…

  2. Informasi Online Perkumpulan Masyarakat Jawa Kelahiran di Sumatera…

    […]Programming: The Microsoft Script Editor « Adrian Online[…]…

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: