handler=

WIN32OLE_EVENT#handler= Instance Public methods sets event handler object. If handler object has onXXX method according to XXX event, then onXXX method is called when XXX event occurs. If handler object has method_missing and there is no method according to the event, then method_missing called and 1-st argument is event name. If handler object has onXXX method and there is block defined by #on_event('XXX'){}, then block is executed but handler object method is not called when XXX

off_event

WIN32OLE_EVENT#off_event([event]) Instance Public methods removes the callback of event. ie = WIN32OLE.new('InternetExplorer.Application') ev = WIN32OLE_EVENT.new(ie) ev.on_event('BeforeNavigate2') {|*args| args.last[6] = true } ... ev.off_event('BeforeNavigate2') ...

on_event

WIN32OLE_EVENT#on_event([event]){...} Instance Public methods Defines the callback event. If argument is omitted, this method defines the callback of all events. If you want to modify reference argument in callback, return hash in callback. If you want to return value to OLE server as result of callback use `return' or :return. ie = WIN32OLE.new('InternetExplorer.Application') ev = WIN32OLE_EVENT.new(ie) ev.on_event("NavigateComplete") {|url| puts url} ev.on_event() {|ev, *args| p

on_event_with_outargs

WIN32OLE_EVENT#on_event_with_outargs([event]){...} Instance Public methods Defines the callback of event. If you want modify argument in callback, you could use this method instead of #on_event. ie = WIN32OLE.new('InternetExplorer.Application') ev = WIN32OLE_EVENT.new(ie) ev.on_event_with_outargs('BeforeNavigate2') {|*args| args.last[6] = true }

unadvise

WIN32OLE_EVENT#unadvise â nil Instance Public methods disconnects OLE server. If this method called, then the WIN32OLE_EVENT object does not receive the OLE server event any more. This method is trial implementation. ie = WIN32OLE.new('InternetExplorer.Application') ev = WIN32OLE_EVENT.new(ie) ev.on_event() {...} ... ev.unadvise

new

WIN32OLE_METHOD.new(ole_type, method) â WIN32OLE_METHOD object Class Public methods Returns a new WIN32OLE_METHOD object which represents the information about OLE method. The first argument ole_type specifies WIN32OLE_TYPE object. The second argument method specifies OLE method name defined OLE class which represents WIN32OLE_TYPE object. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SaveAs')

dispid

WIN32OLE_METHOD#dispid Instance Public methods Returns dispatch ID. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks') method = WIN32OLE_METHOD.new(tobj, 'Add') puts method.dispid # => 181

event?

WIN32OLE_METHOD#event? Instance Public methods Returns true if the method is event. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SheetActivate') puts method.event? # => true

event_interface

WIN32OLE_METHOD#event_interface Instance Public methods Returns event interface name if the method is event. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SheetActivate') puts method.event_interface # => WorkbookEvents

helpcontext

WIN32OLE_METHOD#helpcontext Instance Public methods Returns help context. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks') method = WIN32OLE_METHOD.new(tobj, 'Add') puts method.helpcontext # => 65717