Sha256: 64746ae769f0080554f1fe2bd782ab310ed273088620c0316b2354b2fd3e145e
Contents?: true
Size: 535 Bytes
Versions: 5
Compression:
Stored size: 535 Bytes
Contents
require 'vapir-ie/browser' module Vapir module Process # Returns the number of windows processes running with the specified name. def self.count name mgmt = WIN32OLE.connect('winmgmts:\\\\.') processes = mgmt.InstancesOf('win32_process') processes.extend Enumerable processes.select{|x| x.name == name}.length end end class IE # Returns the number of IEXPLORE processes currently running. def self.process_count Vapir::Process.count 'iexplore.exe' end end end
Version data entries
5 entries across 5 versions & 1 rubygems