Trigger macro on window activation