Updated Script for BBEdit and FTPeel
Posted October 3rd, 2004 @ 08:18am by Erik J. Barzeski
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
Posted 22 Oct 2004 at 9:38pm #
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...! 🙂
Posted 13 Nov 2004 at 2:41pm #
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?
Posted 17 Nov 2004 at 6:16pm #
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.
Posted 16 Nov 2005 at 12:48pm #
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...