wmorgan comments on Who Wants To Start An Important Startup? - Less Wrong

41 Post author: ShannonFriedman 16 August 2012 08:02PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (407)

You are viewing a single comment's thread. Show more comments above.

Comment author: wmorgan 14 August 2012 09:09:08PM *  4 points [-]

I don't know anything about programming Macs, but here are some thoughts for anyone who wants to try this:

  1. DDHotkey can register global hotkeys.
  2. 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.
  3. 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)