This project should be useful as a utility and also as a source of sample code for using the Script Control in VB6 programs. It contains a few other ideas in the source code that might also prove useful: simple location of Special Folder paths, saving program settings, and an enhanced way of using DoEvents(). ScriptDev uses a VB-native form of settings file, not true INI format.
The precompiled binary files were scanned with AVG Free 8.5 and should prove virus-free.
ScriptDev 2.1 is a functional basic WSH VBScript development environment. It incorporates a basic script text editor with Find and Replace operations for VBScript WSH scripts in the .VBS format. ScriptDev supplies a simple implementation of the WScript object allowing many simple scripts to be tested right within the IDE itself. The limitations of this WScript object simulation are described in the ScriptDev Help. ScriptDev can be used to develop and test both WScript and simple CScript scripts.
ScriptDev could be easily modified to support scripts in JScript as well. Adding command line parameter support would make it more practical for CScript development and a more complete WScript object implementation would be a useful enhancement. There is no attempt made at syntax colorization or autocompletion.
While ScriptDev works as a simple IDE, its real purpose is to show how to host the Microsoft Windows Script Control in a VB6 program. The program contains a few rare tricks as well, such as a more sophisticated way of using the VB6 DoEvents() function to allow keyboard input while a script is running.
Basic WScript object emulation.
Simulated console I/O via StdIn, StdErr, StdOut.
Retains IDE settings and last open/save directory.
Control over Timeout, AllowUI, and SafeMode.
4 or 8 character tabstops.
Find, replace, syntax error highlighting.
Lightweight (61K plus 110K msscript.ocx).
Enclosed precompiled binary uses registration-free COM, which allows it to be stored on removable media and run without installation on Windows XP or later. Tested on XP SP3, Vista SP2, and Windows 7 RC.
Should be possible to recompile and package ScriptDev for formal installation on Windows 9x, 2000, and later.
Requires Shell32.dll 5.0 or later, Windows Script 5.6 or later.
Unencumbered public domain freeware. May be used by anyone in whole or in part in either source or binary forms. No guarantees or support offered. ScriptDev is made available as-is for use at your own discretion.
Last edited by dilettante; Sep 30th, 2009 at 12:41 AM.
Added Line and Col display in status bar while in edit mode.
Precompiled binary is now larger (compiled to native code).
Minor optimizations, font changes.
Added another short sample script.
In response to the PM I got: Using the precompiled version of the program with Windows XP (SP2 or later is probably best), Vista, etc. is a simple matter of copying the contents of the "bin" folder to your hard drive or even a flash drive. The versions of the VB6 runtime components on these systems should be fine for use with this utility. If you put it on your hard drive you might want to make a shortcut to it.
I'll look at the change needed for "Shell integration." Without an installer you'd have to go the "open with" route to set this up though. I'll consider adding this as an option within the program.
As it is now the program stores its INI (settings) next to the EXE unless it detects that it has been installed into "Program Files." In that case it makes an entry in your user profile (LOCALAPPDATA).
Last edited by dilettante; Sep 30th, 2009 at 11:44 PM.
Corrected small bug where the "WSH version lie" selected in the IDE was not properly updating checkmarks in the menu.
Reformatted simple online Help text.
Added ability to change the IDE font to any monospaced screen font installed.
Corrected handling of "press ESC" input when script terminates.
If you download script56.chm and install it "next to" ScriptDev.exe it will appear in the Help menu.
Small fix to "find next" logic when we've wrapped around whole script source.
The former CdlOpenSave.cls was rewritten as CommonDlgs.cls, including a ShowFont() method for selecting fonts in addition to ShowOpen() and ShowSave(). May be useful in other projects for replacing COMDLG32.OCX by direct use of COMMDLG.DLL instead.
The program is larger of course, between compiling for native code and adding features it is now around 108KB. The precompiled reg-free COM version is still included as before, allowing "portable" use from removable read/write media like USB flash drives.