66件ヒット
[1-66件を表示]
(0.090秒)
ライブラリ
- win32ole (66)
クラス
- WIN32OLE (44)
-
WIN32OLE
_ TYPE (22)
キーワード
-
default
_ event _ sources (11) -
ole
_ func _ methods (11) -
ole
_ get _ methods (11) -
ole
_ put _ methods (11)
検索結果
先頭5件
-
WIN32OLE
# ole _ methods -> [WIN32OLE _ METHOD] (18213.0) -
オブジェクトのメソッド情報をWIN32OLE_METHODの配列として返します。
...オブジェクトのメソッド情報をWIN32OLE_METHODの配列として返します。
ole_methodsメソッドは、OLEオートメーションサーバが提供するすべてのメソッ
ドをWIN32OLE_METHODの配列として返します。
@return WIN32OLE_METHODの配列。
@raise WIN32OL......の呼び出しに失敗しました。
型情報ライブラリ(TypeLib)が提供されていない場合などに発生します。
excel = WIN32OLE.new('Excel.Application')
methods = excel.ole_methods
@see WIN32OLE#ole_func_methods, WIN32OLE#ole_put_methods... -
WIN32OLE
_ TYPE # ole _ methods -> [WIN32OLE _ METHOD] (18207.0) -
型が持つメソッドのメタデータを取得します。
...。
メソッドを持たない場合は空配列を返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
methods = tobj.ole_methods.map {|m| m.name }
# => ['QueryInterface', 'AddRef', 'Release',....]
@see WIN32OLE_METHOD... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (406.0) -
型が持つソースインターフェイスを取得します。
...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] == "ページが表示されました"......by-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: PropertyChange was called
["{265b75c1-4158-11d0-90f6-0......2010-10-06 22:33:54 +0900: BeforeNavigate2 was called
[#<WIN32OLE:0x9d08f0>, "http://www.ruby-lang.org/", 0, "", nil, "", false]
2010-10-06 22:33:54 +0900: DownloadBegin was called
[]
2010-10-06 22:33:54 +0900: PropertyChange was called
["{D0FCA420-D3F5-11CF-B211-00AA004AE837}"]
2010-10-06 22... -
WIN32OLE
# ole _ func _ methods -> [WIN32OLE _ METHOD] (106.0) -
オブジェクトのファンクション情報をWIN32OLE_METHODの配列として返し ます。
...excel = WIN32OLE.new('Excel.Application')
excel.visible = true
excel.ole_func_methods.each do |fun|
if fun.name.upcase == 'QUIT'
excel._invoke(fun.dispid, [], [])
break
end
end
@see WIN32OLE#ole_methods, WIN32OLE#ole_get_methods,
WIN32OLE#ole_put_methods... -
WIN32OLE
# ole _ get _ methods -> [WIN32OLE _ METHOD] (106.0) -
オブジェクトの参照可能プロパティ情報をWIN32OLE_METHODの配列として 返します。
...excel.ole_get_methods.each do |prop|
begin
puts "#{prop.name}=#{excel._getproperty(prop.dispid, [], [])}"
rescue WIN32OLERuntimeError
puts "can't read #{prop.name} property"
end
end
@see WIN32OLE#ole_methods, WIN32OLE#ole_func_methods,
WIN32OLE#ole_put_methods... -
WIN32OLE
# ole _ put _ methods -> [WIN32OLE _ METHOD] (106.0) -
オブジェクトの設定可能プロパティ情報をWIN32OLE_METHODの配列として 返します。
...た。
型情報ライブラリ(TypeLib)が提供されていない場合などに発生します。
excel = WIN32OLE.new('Excel.Application')
properties = excel.ole_put_methods
@see WIN32OLE#ole_methods, WIN32OLE#ole_func_methods,
WIN32OLE#ole_get_methods...