Try this

require 'Win32API'

hWnd = 985158    # use the hWnd for your process
# pid is a dword
pid=" " * 32
thread=  Win32API.new("user32", "GetWindowThreadProcessId", 'IP',
'I').Call(hWnd,pid)
puts pid.unpack("L")[0]

I think you can do ie.hWnd to get the hWnd on the second line

Paul

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sy Ali
Sent: 04 November 2005 15:04
To: [email protected]
Subject: Re: [Wtr-general] iexplore process remains after closing IE?


On 10/31/05, Jeff Wood <[EMAIL PROTECTED]> wrote:
> require 'watir'
> include Watir
>
> ie = IE.new
> ie.goto "www.google.com"
> ie.close

Is there a way to report the pid of IE.new ?

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to