Sha256: cefc5f242ff52223335ac53f2baa37aa2eca3c30fb1d84e6f2f20dbf6bce3e14

Contents?: true

Size: 543 Bytes

Versions: 3

Compression:

Stored size: 543 Bytes

Contents

module Vapir
  AutoItDLL=File.join(File.expand_path(File.dirname(__FILE__)),'AutoItX3.dll')
  # returns a WIN32OLE for an AutoIt control. if AutoIt is not registered, this will attempt to 
  # registered the bundled AutoIt DLL and return a WIN32OLE for it when it is registered. 
  def self.autoit
    @@autoit||= begin
      begin
        WIN32OLE.new('AutoItX3.Control')
      rescue WIN32OLERuntimeError
        system("regsvr32.exe /s \"#{AutoItDLL.gsub('/', '\\')}\"")
        WIN32OLE.new('AutoItX3.Control')
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vapir-ie-1.10.1 lib/vapir-ie/autoit.rb
vapir-ie-1.10.0 lib/vapir-ie/autoit.rb
vapir-ie-1.9.0 lib/vapir-ie/autoit.rb