Doug Lee wrote:
I would dearly love to be proven wrong on this one, but I don't
believe VBScript lets you use a class method as an event function.

Well, then, prepare to be proven wrong. In Window-Eyes 7.1 and later, you can pass a string like "MyObjectInstance.MyMethod" as the callback to functions that let you pass a function name as a string. That includes StartTimer, Queue, ConnectEvent, Dialog, Menu, and some others.

Obviously, this only works with ActiveScript clients. If you want to do it with .net clients, you'll have to use a delegate. For C++ and VB 6 clients, you're on your own; you'll have to simulate delegate functionality somehow. (That probably means creating a shim object that exposes an IDispatch interface to WE and passes any calls on that interface on to the object method you wanted to delegate them to.)

Reply via email to