48件ヒット
[1-48件を表示]
(0.022秒)
ライブラリ
- win32ole (48)
キーワード
-
ole
_ func _ methods (12) -
ole
_ get _ methods (12) -
ole
_ query _ interface (12)
検索結果
先頭4件
-
WIN32OLE
# each {|i| . . . } -> () (18114.0) -
オブジェクトの列挙インターフェイスを呼び出してアイテム単位にブロックを 実行します。
...イスを持つ
ものがあります。eachメソッドは、このようなオブジェクトの列挙メソッドを
呼び出して、アイテム毎のイテレーションを行います。
@param i コレクション内のアイテム
@raise WIN32OLERuntimeError selfが列挙インターフ......イスをサポートしてい
ない場合に通知します。
excel = WIN32OLE.new('Excel.Application')
book = excel.workbooks.add
sheets = book.worksheets(1)
cells = sheets.cells("A1:A5")
cells.each do |cell|
cell.value = 10
end
excel.Quit... -
WIN32OLE
# ole _ func _ methods -> [WIN32OLE _ METHOD] (7.0) -
オブジェクトのファンクション情報をWIN32OLE_METHODの配列として返し ます。
...をWIN32OLE_METHODの配列として返し
ます。
ole_func_methodsメソッドは、OLEオートメーションサーバのメソッドのうちファ
ンクション(何らかの機能的な操作)に属するものをWIN32OLE_METHODの
配列として返します。
@return WIN32OLE_METHO......Dの配列。
@raise WIN32OLERuntimeError オートメーションサーバの呼び出しに失敗しました。
型情報ライブラリ(TypeLib)が提供されていない場合などに発生します。
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] (7.0) -
オブジェクトの参照可能プロパティ情報をWIN32OLE_METHODの配列として 返します。
...報をWIN32OLE_METHODの配列として
返します。
ole_get_methodsメソッドは、OLEオートメーションサーバのメソッドのうち読
み取り可能なプロパティをWIN32OLE_METHODの配列として返します。
@return WIN32OLE_METHODの配列。
@raise WIN32OLERuntimeEr......xcel = WIN32OLE.new('Excel.Application')
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_f......unc_methods,
WIN32OLE#ole_put_methods... -
WIN32OLE
# ole _ query _ interface(iid) -> WIN32OLE (7.0) -
IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを 持つオブジェクトを取得します。
...return iidパラメータで指定したインターフェイスを持つWIN32OLEオブジェクト
@raise WIN32OLERuntimeError 指定したIIDをオブジェクトが持たない場合に通知されます。
ie = WIN32OLE.new('InternetExplorer.Application')
ie_web_app = ie.ole_query_inter......たOLEオートメーションサーバでは本メソッドが意味
を持つことはありません。というのは、2つ以上の異なるWIN32OLEで操作可能な
インターフェイスを持つということは、IID_IDispatch(OLEオートメーション
のインターフェイスID......BA}', 2]].each do |iid, ver|
begin
intf = obj.ole_query_interface(iid)
intf.ole_free
return ver
rescue WIN32OLERuntimeError
end
end
1
end
しかし、ole_query_interfaceのような特異なメソッドを利用するよりも、
WIN32OLE.new('Vis...