here are two actions: capture scene and return to previous scene that both do what it sounds like they do.
the value of %currentScene% is stored in a global named previousScene that can be used in your other sub-actions.
you can just call these using the "Run Action" Sub-Action at the top and bottom of whatever you want to do in the new scene.