Connecting to FTP server using Panic's Transmit

Has anyone successfully scripted Panic’s Transmit FTP application? I’m falling at the first gate trying to connect to a server.

Here’s what I’m trying to get working. I have a favourite that connects to my Amazon S3 server:

--
--	Created by: Mark Alldritt
--	Created on: 2020-01-24
--
--	Copyright © 2020 Late Night Software Ltd., All Rights Reserved.
--

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

tell application "Transmit"
	set theFavorite to favorite "LNS Amazon S3"
	tell (make new document)
		connect to (contents of theFavorite)
	end tell
end tell

Never mind, I figured it out:

tell application "Transmit"
	-- Prevent interactive alerts from popping up during script execution
	set SuppressAppleScriptAlerts to true
	
	tell (make new document at end)
		tell current tab
			connect to (current application's favorite "LNS Amazon S3")
			tell remote browser
				upload item at path POSIX path of sourceFile to "/path/to/folder/"
			end tell
		end tell
		close
	end tell
end tell

I’m sure the Panic folks mean well, but I grade their scripting interface C-. It works, but its not designed to foster success for the uninitiated.

I’ve been using Transmit for years, and they’ve been fairly responsive to AppleScript issues as they came up. If you wanted to provide them feedback on their scripting interface, I’m sure they’d appreciate it.

1 Like