Getting process currently open in full screen mode
Found something that works. Not sure if it's the best approach.

#!/usr/bin/osascript

tell application "iTerm2"
  set fp to name of current window
end tell


tell application "Safari"
  &lt;snip&gt;
end tell

tell application "iTerm2"
  activate
end tell

tell application "System Events" to tell process "iTerm2"
    click menu item fp of menu of menu bar item "Window" of menu bar 0
end tell