AppleScript - more than title
tell application "System Events" to tell (process 1 where frontmost is true)
    set o to name
    try
        set o to o &amp; ":" &amp; name of window 1
    end try
    o
end tell