36件ヒット
[1-36件を表示]
(0.078秒)
検索結果
先頭3件
-
WIN32OLE
_ EVENT # on _ event(event = nil) {|*args| . . . } -> () (18138.0) -
イベント通知を受けるブロックを登録します。
...WIN32OLE_EVENT#on_event_with_outargsを利用してください。
@raise WIN32OLERuntimeError WIN32OLE_EVENT#unadviseによってイベン
トソースと切断済みです。
ie = WIN32OLE.new('InternetExplorer.Application')
ev = WIN32OLE_EVENT.new(ie......, 'DWebBrowserEvents2')
ev.on_event("NavigateComplete2") do |browser, url|
puts url
end
同じオブジェクトに対してeventパラメータを指定したブロックと指定しないブ
ロックが混在している場合、通知されたイベントに対応するブロックが......だけが呼び出されます。
ie = WIN32OLE.new('InternetExplorer.Application')
ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents2')
ev.on_event("NavigateComplete2") do |browser, url|
puts url
end
ev.on_event do |*args| # <- NavigateComplete2イベント時は実行されない... -
WIN32OLE
_ EVENT # on _ event _ with _ outargs(event = nil) {|*args| . . . } -> () (6120.0) -
イベント通知を受けて結果を呼び出し元へ返すブロックを登録します。
...します。引数を省略した場合は、すべて
のイベントを対象とするブロックの登録となります。
WIN32OLE_EVENT#on_eventと異なり、イベントのブロック変数に戻り値を
設定できます。
@param event イベント名を文字列かシンボルで指......ベン
トソースと切断済みです。
ie = WIN32OLE.new('InternetExplorer.Application')
ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents2')
ev.on_event('BeforeNavigate2') do |*args|
args[6] = true unless args[4] # Cancel = true unless PostData
end
当... -
WIN32OLE
_ EVENT # handler=(obj) -> () (13.0) -
イベント処理を実行するオブジェクトを登録します。
...nternetExplorer.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#on_eventなどの呼び...