- Inheritance
- < Object
WIN32OLE_EVENT objects controls OLE event.
Methods
Class
Visibility | Signature |
---|---|
public | message_loop () |
public | new (...) |
Instance
Visibility | Signature |
---|---|
public | on_event (...) |
public | on_event_with_outargs (...) |
Class Method Detail
WIN32OLE_EVENT.message_loop
Translates and dispatches Windows message.
WIN32OLE_EVENT.new(ole, event) #=> WIN32OLE_EVENT object.
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')
Instance Method Detail
WIN32OLE_EVENT#on_event([event]){...}
Defines the callback event. If argument is omitted, this method defines the callback of all events.
ie = WIN32OLE.new('InternetExplorer.Application') ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents') ev.on_event("NavigateComplete") {|url| puts url}
WIN32OLE_EVENT#on_event_with_outargs([event]){...}
Defines the callback of event. If you want modify argument in callback, you should use this method instead of WIN32OLE_EVENT#on_event.