I wonder about activating windows...(daa?)

When I run my program and make another one active, I want it to - after a short period of time - become active again. I.e. not having to use Alt+Tab or similar.

Is there a command or a property for this?
Cheers, Pentax