Help for this page
my $activeWindow; ... } # and so on...
my $checkActive = $Window1->AddTimer( -name => "checkActive", 10 ... sub checkActive_Timer { $activeWindow = Win32::GUI::GetForegroundWindow(); }