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') ...

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

handler

WIN32OLE_EVENT#handler Instance Public methods returns handler object.

new

WIN32OLE_EVENT.new(ole, event) #=> WIN32OLE_EVENT object. Class Public methods Returns OLE event object. The first argument specifies WIN32OLE object. The second argument specifies OLE event name. ie = WIN32OLE.new('InternetExplorer.Application') ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents')

message_loop

WIN32OLE_EVENT.message_loop Class Public methods Translates and dispatches Windows message.

setproperty

WIN32OLE.setproperty('property', [arg1, arg2,...] val) Instance Public methods Sets property of OLE object. When you want to set property with argument, you can use this method. excel = WIN32OLE.new('Excel.Application') excel.Visible = true book = excel.workbooks.add sheet = book.worksheets(1) sheet.setproperty('Cells', 1, 2, 10) # => The B1 cell value is 10.

ole_typelib

WIN32OLE#ole_typelib â The WIN32OLE_TYPELIB object Instance Public methods Returns the WIN32OLE_TYPELIB object. The object represents the type library which contains the WIN32OLE object. excel = WIN32OLE.new('Excel.Application') tlib = excel.ole_typelib puts tlib.name # -> 'Microsoft Excel 9.0 Object Library'

ole_type

WIN32OLE#ole_type Instance Public methods Returns WIN32OLE_TYPE object. excel = WIN32OLE.new('Excel.Application') tobj = excel.ole_type ole_obj_help

ole_respond_to?

WIN32OLE#ole_respond_to?(method) â true or false Instance Public methods Returns true when OLE object has OLE method, otherwise returns false. ie = WIN32OLE.new('InternetExplorer.Application') ie.ole_respond_to?("gohome") => true

ole_query_interface

WIN32OLE#ole_query_interface(iid) â WIN32OLE object Instance Public methods Returns WIN32OLE object for a specific dispatch or dual interface specified by iid. ie = WIN32OLE.new('InternetExplorer.Application') ie_web_app = ie.ole_query_interface('{0002DF05-0000-0000-C000-000000000046}') # => WIN32OLE object for dispinterface IWebBrowserApp