ScriptCalc is simple frontend to the Microsoft Script Control. I wrote SCalc to 
use it instead of Windows Calculator, because I prefer to work with expressions.

ScriptCalc evaluates VBScript or JScript expression, like "2+2" or 
"? #12/31/2002# - Now()" (how many days left till the end of the year).
You can run simple routines, like
A=2
B=2
?A+B

But SCalc is much more powerful. In "Script Mode" SCalc can run full blown 
VBScript routines, see routine example below.

If you are VB or MS Acccess programmer, in expression mode SCalc works like 
standalone Immidiate Window, except for result area, which is separated.

How to use.

Type expression in expression area, hit Enter.

List of features.

SCalc uses small screen space.

Default window mode is "non-modal always on top". You can uncheck "Always on top" 
in system menu (click icon in SCalc window).

In expression mode you can use Ctrl/Enter to go to next line (Enter evaluates 
the expression, Ctrl/Enter does not).

Use "Script Mode" checkbox to switch mode between 'expression' and 'script'.

You can switch between VBScript/JScript using listbox on the status bar.

"?" is optional if your expression starts with number.

F1 key displays VBScript/JScript help. Files Vbscrip5.chm and Jscript5.chm required 
to be installed in SCalc.exe directory. These files also installed by some MS 
applications at C:\Program Files\Microsoft Visual Studio\Common\IDE\IDE98\MSE\1033\
and are available for online viewing at 
http://msdn.microsoft.com/scripting/
You can also search internet for Vbscrip5.chm and Jscript5.chm. I didn't include them
in this package bacause of their size.

Installation.

If you already have MSVBVM60.DLL and MSSCRIPT.OCX, you may need only 40k SCalc.EXE
otherwise, open SCalc.ZIP and run setup.exe. According to MS, Windows 2000 already
has MSSCRIPT.OCX.

Known problems. 

1. Split line between expression and result area sometimes can't move.

2. Open SCalc full screen. Drag split line to the bottom. Restore window. Status bar
is only partially visible now.

3. If "? 0/0" (or any other runtime error) brings up message box:

        "An exception of type 'Runtime Error' was not handled."
        "Would you like to debug the application?"
 
Run Devenv.exe Tools | Options | Debugger "Just-In-Time debugging" - uncheck.

SCalc is freeware. Have fun.

Report bugs and suggestions to Vadim Frenkel vfrenkel@xenergy.com

************************************************************

Sample VBScript routine (Excel required).

' This sample demonstrates how to access Microsoft Excel using the Windows Scripting.

L_Welcome_MsgBox_Message_Text = "This script demonstrates how to access Excel using the Windows Scripting."
L_Welcome_MsgBox_Title_Text   = "Windows Scripting Sample"
Call Welcome()
    
' *
' * Excel Sample
' *

Dim objXL
Dim objXLchart
Dim intRotate

Set objXL = CreateObject("Excel.Application")
objXL.Workbooks.Add
objXL.Cells(1,1).Value = 5
objXL.Cells(1,2).Value = 10
objXL.Cells(1,3).Value = 15
objXL.Range("A1:C1").Select

Set objXLchart = objXL.Charts.Add()
objXL.Visible = True
objXLchart.Type = -4100     

For intRotate = 5 To 180 Step 5
    objXLchart.Rotation = intRotate
Next

For intRotate = 175 To 0 Step -5
    objXLchart.Rotation = intRotate
Next

' *
' * Welcome
' *
Sub Welcome()
    Dim intDoIt

    intDoIt =  MsgBox(L_Welcome_MsgBox_Message_Text, _
                      vbOKCancel + vbInformation,    _
                      L_Welcome_MsgBox_Title_Text )
    If intDoIt = vbCancel Then
        WScript.Quit
    End If
End Sub

