48件ヒット
[1-48件を表示]
(0.036秒)
別のキーワード
種類
- インスタンスメソッド (24)
- 特異メソッド (12)
- クラス (12)
ライブラリ
- win32ole (48)
クラス
-
WIN32OLE
_ EVENT (24) -
WIN32OLE
_ TYPE (12)
キーワード
-
WIN32OLE
_ EVENT (12) -
default
_ event _ sources (12) - handler= (12)
検索結果
先頭4件
-
WIN32OLE
_ EVENT . message _ loop -> () (18137.0) -
Windowsのメッセージポンプを実行します。
...Windowsのメッセージポンプを実行します。
message_loopメソッドは、Windowsメッセージがキューイングされている限りメッ
セージの読み出しとディスパッチを実行します。
COMのスレッド間/プロセス間通信はスレッド内で呼び出.......new(ie, 'DWebBrowserEvents2')
b = false
event.on_event('DocumentComplete') do |disp, uri|
disp.document.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
なお、メソッド名はloopですが、呼び出し時および既にキューイングされたメッ
セージの処理中にキューされたメッセージの処理が終わると... -
WIN32OLE
_ EVENT # handler=(obj) -> () (106.0) -
イベント処理を実行するオブジェクトを登録します。
...ければmethod_missingが呼ばれます。イベン
ト名は大文字小文字を区別するため、正確な記述が必要です。
@param obj イベントに対応するメソッドを持つオブジェクト。イベント受信を
解除するにはnilを指定します。
c......r
def initialize
@completed = false
end
attr_reader :completed
def onDocumentComplete(disp, uri)
disp.document.getElementsByTagName('a').each do |e|
puts "#{e.innerHTML}=#{e.href}"
end
@completed = true
end
def method_missing(id, *args)
p......tExplorer.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などの呼び出し... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (30.0) -
型が持つソースインターフェイスを取得します。
...です。ソースインターフェイスを持
たない場合は空配列を返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
tobj.default_event_sources.map {|intf| intf.name} #=> ["DocEvents"]
WIN32OLE_EVENT.newでインターフェイ......出し(=イベント通知)をトレースして調べるプ
ログラムです。イベントを受け付けるために、
WIN32OLE_EVENT.message_loopの呼び出しが必要な点に注意してください。
ここでは最終イベントのStatusTextChangeイベントのメッセージに......rer')
ctl = WIN32OLE.new(type.progid)
source = type.default_event_sources[0]
class WebEvent
def initialize
@completed = false
end
attr_reader :completed
end
source.ole_methods.each do |m|
WebEvent.module_eval do
define_method("on#{m.name}") do |*arg|
if arg[0] == "... -
WIN32OLE
_ EVENT (24.0) -
OLEオートメーションサーバからのイベント通知を制御するクラスです。
....new(ie, 'DWebBrowserEvents2')
b = false
event.on_event('DocumentComplete') do |disp, uri|
disp.document.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...