1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/win32ole/err_in_callback.rb

12 lines
226 B
Ruby
Raw Normal View History

require 'win32ole'
ie = WIN32OLE.new('InternetExplorer.Application')
ie.visible = true
WIN32OLE_EVENT.message_loop
sleep 0.2
ev = WIN32OLE_EVENT.new(ie)
ev.on_event('BeforeNavigate2') {|*args|
foo
}
ie.navigate(ARGV.shift)