Subscribe to
Posts
Comments
NSLog(); Header Image

Updated Script for BBEdit and FTPeel

I've finally gotten around to updating my favorite AppleScript for BBEdit so that it works properly with BBEdit 8's "tabbed" windows:

set filepath to ""
tell application "BBEdit"
    set thisFile to (active document of front window)
    save thisFile
    set filepath to file of thisFile
end tell
tell application "FTPeel"
    open filepath
end tell

4 Responses to "Updated Script for BBEdit and FTPeel"

  1. And here's a slightly enhanced version - just because I got so inspired by your script and FTPeel's MagicMirrors... Now I just need to buy FTPeel and my workflow will improve several times 🙂

    set filepath to ""

    set theUrl to ""

    tell application "BBEdit"

    set thisFile to (active document of front window)

    save thisFile

    set filepath to file of thisFile

    set site to container web site of thisFile

    set theUrl to (URL of thisFile)

    end tell

    tell application "FTPeel"

    open filepath

    end tell

    tell application "OmniWeb"

    GetURL theUrl

    activate

    end tell

    I've added a tiny bit to make OmniWeb open the same document. It relies on you having defined a web site in BBEdit which the current document resides in locally, thus enabling me to get a correct URL easily for the document from BBEdit. Now if only someone could tell me how to wait for the upload to complete before telling OmniWeb to open the document - that would top it off!

    Feel free to send me a note if you find use for this, or if you solve my final feature, or...! 🙂

  2. This is exactly what I'm trying to do with Textmate, except I don't really understand Applescript or Textmate's implementation of Applescript. Anyone figured this out yet?

  3. Alan from Macromates whipped up the command to get this working in Textmate:

    osascript -e "tell application \"FTPeel\" to open \"`echo ${TM_FILEPATH:1}|tr / :`\""

    works like a charm.

  4. When I last wrote about TextMate, I commented on its lack of preferences and, essentially, shelved the idea of using TextMate because of it. Today I grabbed the latest beta and gave it a whirl. I was perhaps 30 minutes...