The current working file of a window is called the “represented file.” You can get the path to it by calling representedFilename of the active NSWindow (I couldn’t figure out how to get the active NSWindow). I didn’t try to find out how to get the currently selected file in the Finder.
Cyberduck is scriptable with AppleScript, I think. It has an “Upload” entry point. See here. It has a single required argument, the path of the file to upload. Wouldn’t it be sweet if you could pass in the path from step #2, and everything just worked?
(Another option for step #3 would be to programmatically drag-drop the active file to the Cyberduck window, but I couldn’t figure out how to do that)
I don’t know anything about programming Macs, but here are some thoughts for anyone who wants to try this:
DDHotkey can register global hotkeys.
The current working file of a window is called the “represented file.” You can get the path to it by calling representedFilename of the active NSWindow (I couldn’t figure out how to get the active NSWindow). I didn’t try to find out how to get the currently selected file in the Finder.
Cyberduck is scriptable with AppleScript, I think. It has an “Upload” entry point. See here. It has a single required argument, the path of the file to upload. Wouldn’t it be sweet if you could pass in the path from step #2, and everything just worked?
(Another option for step #3 would be to programmatically drag-drop the active file to the Cyberduck window, but I couldn’t figure out how to do that)