mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
12 lines
237 B
Ruby
12 lines
237 B
Ruby
|
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)
|