From: steve Date: 2009-09-30T16:20:05+09:00 Subject: Re: if process.exist then . . . ??? Bigmac Turdsplash wrote: > Here is what i have so far... i have been playing with this for a while > now... im getting no were ,-( > > require 'rubygems' > require "win32/process" > require "sys/proctable" > include Sys > > pids = [] > ProcTable.ps{ |s| > pids.push(s.pid) if s.cmdline =~ /calc/ > > } > if pids.length.zero? puts 'calc not running' else puts 'calc is running' end