Transmit AppleScript - Duplicate current tab

I often find myself wanting more than one tab connected to a server in Transmit 4, and it's a bit painful (for a keyboard junkie) to navigate up a directory then right click and choose "Open in New Tab". If there were a menu item for Open in New Tab, I probably would have used something like Keyboard Maestro to accomplish this rather than AppleScript. Save this script and create a hotkey with your favorite app - Spark, Keyboard Maestro, FastScripts, etc. I used Cmd-Shift-T.

You must be connected to a favorite for this to work. When triggered, the script should connect to your current favorite at the same path in a new tab.


tell application "Transmit"
    set theBrowser to remote browser of current tab of document 1
    set thePath to root path of theBrowser
    set theFavorite to favorite of theBrowser

    set current tab of document 1 to (make new tab at end of document 1)
    tell current tab of document 1
        connect to theFavorite
        change location of remote browser to path thePath
    end tell
end tell