48件ヒット
[1-48件を表示]
(0.076秒)
クラス
-
Net
:: SMTP (12) - WIN32OLE (12)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (12)
キーワード
-
default
_ event _ sources (12) - handler= (12)
-
ole
_ respond _ to? (12)
検索結果
先頭4件
-
Net
:: SMTP # quit -> Net :: SMTP :: Response (18224.0) -
QUIT コマンドを送ります。
...QUIT コマンドを送ります。
通常は Net::SMTP#finish で
QUIT が送られるため利用する必要はないはずです。... -
WIN32OLE
# ole _ respond _ to?(name) -> bool (6107.0) -
指定したメソッドをオブジェクトがサポートしているか調べます。
...ド名を文字列またはシンボルで指定します。
@return nameで指定したメソッドをオブジェクトが提供していれば真を返します。
excel = WIN32OLE.new('Excel.Application')
excel.ole_respond_to?(:quit) #=> true
excel.ole_respond_to?(:exit) #=> false... -
WIN32OLE
_ EVENT # handler=(obj) -> () (25.0) -
イベント処理を実行するオブジェクトを登録します。
...ジェクトをイベントハンドラとし
て登録します。
イベントハンドラはイベント名に「on」を前置します。もし、イベントに対応
するonメソッドが実装されていなければmethod_missingが呼ばれます。イベン
ト名は大文字小文字......解除するにはnilを指定します。
class IeHandler
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
@compl......ternetExplorer.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] (13.0) -
型が持つソースインターフェイスを取得します。
...Internet Controls', 'InternetExplorer')
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}"......ndler = WebEvent.new
ctl.navigate2 'http://www.ruby-lang.org/'
loop do
break if evt.handler.completed
WIN32OLE_EVENT.message_loop
end
ctl.Quit
このプログラムを実行するとWindows7のIE8環境では以下のような出力を得られ
ます。
2010-10-06 22:33:54 +0900: Prope...