Last active
October 1, 2015 12:57
-
-
Save 1024jp/1996042 to your computer and use it in GitHub Desktop.
upload current document on CotEditor with Transmit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Upload on Transmit | |
[description] | |
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 <http://wolfrosch.com/> | |
[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 | |
beep | |
display alert "No file path is specified." message "Please save the file first." as warning | |
return | |
end if | |
return | |
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