From: Frazier, J. J. <Joe...@Pe...> - 2001-06-01 15:34:52
|
> -----Original Message----- > From: Morbus Iff [mailto:mo...@di...] > Sent: Friday, June 01, 2001 10:50 > To: per...@li... > Subject: Re: [perl-win32-gui-users] Opening a *New* Browser Window? >=20 >=20 > >>| Well, then you just take the best of both ... first, you=20 > open a new > >>| window and then you do what you did before. I pretty=20 > sure that the > >>| ShellExecute will target this new browser. At least,=20 > when I click a link > > > >That was so blatantly obvious that I'm hiding in a corner=20 > for not seeing it > >myself. I tried it this morning using the following code: > > Check your logic.... > > use Win32::TieRegistry; > > my $http =3D $Registry->{"Classes\\http\\shell\\open\\command"}->{'\\'}; > > unless ( fork ) { system("$http"); } You call system here..... and then... > > use Win32::API; > > my $ShellExecute =3D new Win32::API("shell32", = "ShellExecuteA", > > ['N','P', 'P', 'P', 'P', 'I'], 'N'); > > $ShellExecute->Call(0, "open", $url, 0, 0, 1); You call the ShellExecuteA. This results in two windows. Now... I have never used fork, so i dont know the exact syntax, but somthing like this.... use Win32::TieRegistry; use Win32::API; my $http =3D $Registry->{"Classes\\http\\shell\\open\\command"}->{'\\'}; unless (`start $http $url`){ # if this call fails, do this..... my $ShellExecute =3D new Win32::API("shell32", "ShellExecuteA",['N','P', 'P', 'P', 'P', 'I'], 'N'); $ShellExecute->Call(0, "open", $url, 0, 0, 1); } > > > >This works fine in IE6b. I'll assume it works fine=20 > elsewhere. It does very > >weird things on Mozilla though. Can anyone try this on=20 > Netscape to see if > >it's similar (I don't have NS on this machine, only Moz). >=20 > Correction. This does not work on IE6. Opens two windows. >=20 >=20 > Morbus Iff > .sig on other machine. > http://www.disobey.com/ > http://www.gamegrene.com/ >=20 >=20 > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >=20 |