Um bei Google eine Codebeispiel zu finden, wie Transmit 4 via AppleScript zu einem Upload zu bewegen ist, gibt man… ehm… Ich habe keine Ahnung, wie man so etwas finden soll. Nach einer gezielten Suche bei MacScripter.net hatte ich es aber nun zusammen. Jetzt kann ich meine Bilder via Quicklook durchsehen und per Shortcut in das aktuelle Verzeichnis in Transmit laden (ist es denn zu glauben, cmd+U ist im Finder noch nicht belegt!).
–hubionmac.com 16.01.2011
–upload Finder selection to remote directory of frontmost Transmit Session
— Tested using Mac OS X 10.6.5 and Transmit 4.1.4
tell application “Finder” to set thefiles to get selection
repeat with thefile in thefiles
tell application “Finder” to set thefileName to (name of thefile) as text
upload2Transmit(thefile as alias)
end repeat
on upload2Transmit(thefile)
tell application “Transmit”
tell document 1
tell current tab
if remote browser is not missing value then
tell remote browser
upload item at path thefile
end tell
else
error “Transmit is not connected”
end if
end tell
end tell
end tell
end upload2Transmit