. Coda is a trademark of Panic, Inc.
----------------------------
-- Configure here
----------------------------
-- Full path to local file, TM project or folder
set localProject to "/tmp"
-- These will be opened in the default browser
-- (Set to {} to open nothing)
set URLs to {"http://localhost/~me/somesite", "http://example.com/somesite"}
-- The name of a related Transmit favorite
-- (Set to "" if you don't want to open Transmit)
set transmitFavorite to "Some site"
-- SSH server
-- (Set to "" if you don't want a SSH session)
set sshServer to "example.com"
-- SSH username (set to "" to use defaults)
set sshUser to ""
-- The SSH password must be entered manually; optionally set up DSA keys so you don't have to input it at all: see e.g. http://www.macosxhints.com/article.php?story=20011128174701140
----------------------------
-- Configuration ends
----------------------------
if transmitFavorite is not "" then
tell application "Transmit"
if (count of documents) is 0 then
make new document at end
end if
tell document 1
set theTab to (session 1)
if is connected of session 1 then
set theTab to (add tab)
end if
tell theTab
if not (connect to favorite with name transmitFavorite) then
display dialog "Could not connect to favorite!" buttons "For shame!" default button 1 with icon 1
end if
end tell
end tell
end tell
end if
if sshServer is not "" then
tell application "Terminal"
if sshUser is not "" then
set sshUser to sshUser & "@"
end if
do script "ssh " & sshUser & sshServer
end tell
end if
repeat with anURL in URLs
open location anURL -- in default browser
end repeat
if localProject is not "" then
tell application "TextMate"
open POSIX file localProject as alias
activate
end tell
end if