in reply to Scan open InternetExplorer windows with Win32::OLE

This code just seems to take whichever window was opened first
What would you expect GetActiveObject to do? I think you should try EnumAllObjects.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

  • Comment on Re: Scan open InternetExplorer windows with Win32::OLE

Replies are listed 'Best First'.
Re^2: Scan open InternetExplorer windows with Win32::OLE
by mowens (Initiate) on Nov 09, 2004 at 19:59 UTC
    Thanks for the reply. On your suggestion I tried EnumAllObjects. As far as I can tell, this method seems to only enum objects created by Win32::OLE or latched onto by GetActiveObject. Running the documentation's example code supports this.
    use Win32::OLE; my $IE = Win32::OLE->GetActiveObject('InternetExplorer.Application'); print $Count = Win32::OLE->EnumAllObjects(sub { my $Object = shift; my $Class = Win32::OLE->QueryObjectType($Object); printf "# Object=%s Class=%s\n", $Object, $Class; });