I want to get the name of the active application and its frontmost window and store that info in one or two variables.
You have the tokens:
%FrontWindowName%
%Application%1%
For more information, see the wiki Searching the Forum for Answers section.