るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.010秒)

別のキーワード

  1. rss href
  2. rss href=
  3. xmlstylesheet href
  4. xmlstylesheet href=
  5. href rss

検索結果

WIN32OLE_EVENT (25.0)

OLEオートメーションサーバからのイベント通知を制御するクラスです。

...ベント」と呼びます。WIN32OLE_EVENTを利用
すると、ブロックの形式でイベントを受け取るメソッドをサーバへ登録できま
す。

=== サンプルコード

ie = WIN32OLE.new('InternetExplorer.Application.1')
event = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents...
...nt.getElementsByTagName('a').each do |e|
puts "#{e.innerHTML}=#{e.href}" #=> ダウンロード=http://www.ruby-lang.org/ja/downloads/ など
end
disp.quit
b = true
end
ie.Navigate2 'http://www.ruby-lang.org/ja/'
loop do
break if b
WIN32OLE
_EVENT.message_loop
end...

WIN32OLE_EVENT#handler=(obj) -> () (25.0)

イベント処理を実行するオブジェクトを登録します。

...ie = WIN32OLE.new('InternetExplorer.Application.1')
event = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents2')
event.handler = IeHandler.new
ie.Navigate2 'http://www.ruby-lang.org/ja/'
loop do
break if event.handler.completed
WIN32OLE
_EVENT.message_loop
end
ie.Quit

WIN32OLE
_EVENT#...

WIN32OLE_EVENT.message_loop -> () (25.0)

Windowsのメッセージポンプを実行します。

...ト処理は
Windowsメッセージを読み取ってディスパッチすることで通知されます。

ie = WIN32OLE.new('InternetExplorer.Application.1')
event = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents2')
b = false
event.on_event('DocumentComplete') do |disp, uri|
disp.document....
...by-lang.org/ja/downloads/ など
end
disp.quit
b = true
end
ie.Navigate2 'http://www.ruby-lang.org/ja/'
loop do
break if b
WIN32OLE
_EVENT.message_loop
end

なお、メソッド名はloopですが、呼び出し時および既にキューイングされたメッ
セージ...