Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
upload current document on CotEditor with Transmit
Upload on Transmit
Upload current document on CotEditor via Transmit.
Required to enable DockSend service on Transmit.
[version] 1.1
[release] 2012-03-07
[lastmod] 2014-12-02
[author] 1024jp <>
[licence] Creative Commons Attribution 4.0 International License
-- __setting_______________________________________________________________
-- Shows dialog if the document wasn't saved?
property showAlertDialog : true
-- __main_______________________________________________________________
-- get file path from CotEditor
tell application "CotEditor"
if not (exists front document) then return
set theFile to file of front document
end tell
-- end script if no file path is specified
if theFile is missing value then
if showAlertDialog then
display alert "No file path is specified." message "Please save the file first." as warning
end if
end if
-- give the file to Transmit
tell application "Transmit" to open theFile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.