Hey Pariah,
Yes, but it's not going to be a no-brainer task.
Run this in the Applescript Editor.app to see an AppleScript-List-Object showing tab-urls in sub-lists by window:
tell application "Google Chrome"
set windowTabList to URL of tabs of windows
end tell
That list can be broken down into text OR it can be saved as is and used to rebuild a window/tab structure.
To do something similar in the Finder:
------------------------------------------------------------------------------
tell application "Finder"
set winList to windows
repeat with theWin in winList
try -- Filter-out any search windows and convert to aliases.
set contents of theWin to (target of theWin as alias)
on error
set contents of theWin to 0
end try
end repeat
end tell
# Finish filtering
set winList to aliases of winList
------------------------------------------------------------------------------
To get running application names:
------------------------------------------------------------------------------
tell application "System Events"
set runningAppList to name of processes whose background only is false
end tell
------------------------------------------------------------------------------
This gives you most of the pieces you need to construct your macro.
Remember to TEST AppleScripts in the Script Editor.app, BEFORE trying to run them from Keyboard Maestro.
The scripts I've provided return AppleScript objects and don't play as nicely with Keyboard Maestro as will ultimately be desired.
You're going to have to decide how you want to store your data-sets, before you adjust the output of the scripts to suit.
-Chris