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...