Unfortunately the Scriptom project was lost with the closure of Codehaus. This is an attempt to resurrect it.
Scriptom provides a simple yet powerful COM library for Groovy. It is implemented as a thin layer around [JACOB (Java COM Bridge)](https://sourceforge.net/projects/jacob-project/). JACOB is a mature open-source library for Java that supports communicating with COM libraries and automation servers on Microsoft Windows.
Scriptom attempts to mirror all the functionality of JACOB, but in a "groovy" way. Here is a quick example that uses Scripting.FileSystemObject to list the paths to all active rooted drives on your system (italics show COM methods and properties):
new ActiveXObject('Scripting.FileSystemObject').Drives.findAll{it.IsReady}.each{println it.Path} `Visual Basic was never this easy!
| Variant-Type | Supported? | Java | VB6/VBA | Comments |
|---|---|---|---|---|
Empty | Yes |
|
| |
Null | Yes |
|
| Don’t be confused. |
Short | Yes |
|
| An |
Int | Yes |
|
| A |
Long | Yes |
| A 64-bit signed value. Supported by .NET. |
By default, all Variants in Scriptom are passed by value (not byref). Note that it is safe to pass values byval even when the method argument is marked as 'byref.' In COM, 'byref' arguments allow a method to change a value which is then reflected in the calling scope. If you need to do this, take a look at the VariantByref class. You shouldn’t run into this very often with the standard COM libraries, but isn’t it nice to know we’ve got your back?
Unsigned integer types are also supported by Scriptom. Each COM unsigned type is converted to equivalent signed Java type.