| 1 | # frozen_string_literal: false |
| 2 | require 'win32ole' |
| 3 | |
| 4 | ie = WIN32OLE.new('InternetExplorer.Application') |
| 5 | =begin |
| 6 | WIN32OLE.const_load(ie) |
| 7 | WIN32OLE.constants.sort.each do |c| |
| 8 | puts "#{c} = #{WIN32OLE.const_get(c)}" |
| 9 | end |
| 10 | =end |
| 11 | |
| 12 | module IE_CONST |
| 13 | end |
| 14 | |
| 15 | WIN32OLE.const_load(ie, IE_CONST) |
| 16 | IE_CONST.constants.sort.each do |c| |
| 17 | puts "#{c} = #{IE_CONST.const_get(c)}" |
| 18 | end |
| 19 | |
| 20 | #------------------------------------------------------------ |
| 21 | # Remark!!! CONSTANTS has not tested enoughly!!! |
| 22 | # CONSTANTS is alpha release. |
| 23 | # If there are constants which first letter is not [a-zA-Z], |
| 24 | # like a '_Foo', then maybe you can access the value by |
| 25 | # using CONSTANTS['_Foo'] |
| 26 | #------------------------------------------------------------ |
| 27 | IE_CONST::CONSTANTS.each do |k, v| |
| 28 | puts "#{k} = #{v}" |
| 29 | end |
| 30 | |
| 31 | puts WIN32OLE::VERSION |
| 32 | ie.quit |
| 33 |