SiloScript: a scripting engine for Silo
by Black Lizard 2005-04-25

A simple script bridge to enable VBScript/JavaScript coders to write extensions to Silo.

NOTE:
Executing scripts with errors may kill (read: WILL kill) the Silo app, so please be careful and,
while debugging use care and save a lot.
Be prepared to restart your Silo often.

Configuration:
After installing the plugin (see next section) update your SiloScript.ini to add your list
of favourite plugins:

[SCRIPTn]
SCRIPT_NAME=The Coolest Script
SCRIPT_PATH=Plugins\Startup Plugins\SiloScript\ACoolPlugin.vbsilo
LANGUAGE=VB

n goes from 1 to the max number of scripts you want to configure.
SCRIPT_NAME will be shown in your Options -> Keyboard Shortcuts panel near "SiloScript : ", use it to
define a key shortcut to the script.
SCRIPT_PATH defines the script file relative to Silo Main directory.
LANGUAGE may be VB for VBScripts scripts and JS for JavaScript scripts.

Installation instructions:

1- Install MS ScriptControl:
   [url]http://download.microsoft.com/download/winscript56/Install/1.0/W982KMeXP/EN-US/sct10en.exe[/url]
   If it asks you to overwrite existing libs then probably some other prog already installed it.
   Simply say no to all overwrite questions.

2- Extract zip data into your Silo\Plugins\Startup Plugins
   You should get a SiloScript.dll (the plugin) a SiloScript.ini (the cfg file)
   and SiloScript dir (COM bridge and some scripts)
   In the SiloScript dir you can also find a simple tester application:
   Usage: SiloScriptTester scriptpath [VB|JS] (if lang is not specified then defaults VB)
   The tester simply loads the script, compiles it and tries to execute (simple simulation of course, nothing happen)
   Any found error is printed on console (error desc, line and column and text raising error)

3- In SiloScript dir double click RegisterScriptBridge.bat to register the COM component
   (only the first time then for future version you can simple overwrite it).
   If deleting the plugin doubleclick on UnRegisterScriptBridge.bat first to clean your Windoze registry.

4- Open Silo

5- Config shortcuts -> you should see some SiloScript: [script name + lang]. Set key for a script (i.e. Bridge)

6- Create a couple of cubes, select two faces and activate the script, faces should be bridged together.
Look at the script and experiment.

Currently VB lang can interact with users much better than JScript:
when not running in a HTML host, doesn't support typical windowing methods (i.e. alert()).

See sample scripts to get an overview of the Object Model, some "docs" will follow.

NOTE:
Executing scripts with errors may kill (read: WILL kill) the Silo app, so please be careful and,
while debugging use care and save a lot.
Be prepared to restart your Silo often.

Byez,
Black Lizard
