Thanks again so much BrowserUk, your example is exactly what I needed...
FYI, I'm accessing Outlook and I'm retrieving information. However, ever since Outlook 2000 SP2, a security window pops up : the aim of my thread is to monitor Windows and see whether that window pops up. The thread calls a sub which code is :
sub clearSecurity { # As of Outlook 2000 SP2, MS has added a security component that preve +nts any code # run from accessing Outlook's inner properties. To impede that techni +cal protection # we need to clear the security popup window. my $securityHandle = 0; while (1) # keep on running the test { sleep(5); # sleep 5 seconds to wait for popup window to come up +(should there be one) $securityHandle = LTG::dialog::findSecurityWindow(); LTG::dialog::clearSecurityWindow($securityHandle) if ($securityH +andle); } }

What I'm aiming at is to start the sub prior to fiddling with Outlook and kill right after having finished with Outlook...

In reply to Re: Re: Create a separate process with a sub... by Foggy Bottoms
in thread Create a separate process with a sub... by Foggy Bottoms

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.