This is not much a Perl-ish answer, but I guess it's not mostly a Perl problem - this is probably because of the threading model the object is running under. I have come across the same problem with VisualBasic and JavaScript object creation, and I have found that, to obtain different and separate independent copies, you can:
- Create an object of type WScript.Shell
- Call the "run" method on it to launch a separate browser (or whatever program you need to run)
This is a sample, just not to go completely off-topic and being thrown out of the monastery for messing with the Enemy without providing appropriate Perl code as an offer:
use Win32::OLE;
my $url = 'http://www.perlmonks.com/index.pl?node_id=';
# opens five separate instances
for (my $i = 0; $i < 5; $i++ ) {
my $node_id = 300000 + $i;
$obSh = Win32::OLE->new('WScript.Shell');
$rc = $obSh->run("IEXPLORE.EXE ${url}${node_id}", 1, false);
undef $obSh;
}
On my Windows box, each copy of explorer is independent and separately prompts for the proxy password.
You might want to read this too.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.