my $securityHandle = 0; while (not ($securityHandle)) # detects Outlook's popup window that asks whether access should be granted to { # perl code to Outlook's inner properties. $securityHandle = LTG::dialog::findSecurityWindow(); # wait for security window to pop-up... print "shandle : $securityHandle\n"; # debug purposes } # window has been found - clear it LTG::dialog::clearSecurityWindow($securityHandle);