lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Having re-adapted some things to make it work in luacheia again, I've now
got it working.

One note: why has the call to CoInitialize() been removed?  Without it, it
doesn't work at all (not suprisingly)

The luacom.pairs() seems to work very nicely, I can now successfully iterate
the Drives collection :

fso = luacom.CreateObject("Scripting.FileSystemObject")

for i,v in luacom.pairs(fso.Drives) do
    if v.IsReady then
        print(v.DriveLetter, v.VolumeName)

I haven't tried the collection index addition yet, but I will.  I presume
setting of values could also be done with a __newindex method here?

Instead of having to set things like:

    objConfig = luacom.CreateObject("CDO.Configuration")
    Fields    = objConfig.Fields

    Fields:Item(cdoSendUsingMethod).Value       = cdoSendUsingPort
    Fields:Item(cdoSMTPServer).Value            = ""
    Fields:Item(cdoSMTPServerPort).Value        = 25
    Fields:Item(cdoSMTPConnectionTimeout).Value = 10

It would be nice to just set:

    Fields[cdoSendUsingMethod] = cdoSendUsingPort

etc.  Or possibly

    Fields[cdoSendUsingMethod].Value = cdoSendUsingPort


Love, Light and Peace,
- Peter Loveday
Director of Development, eyeon Software