Author Topic: bbedit autoroute script?  (Read 5579 times)

suzerain

  • Jr. Member
  • **
  • Posts: 5
bbedit autoroute script?
« on: April 05, 2006, 02:42:13 AM »
Hi there.  It's mentioned in the product features that a script could be written to reside in BBEdit's scripts menu to send the currently edited file to Yummy FTP and have it upload via the autoroute feature.

I just wanted to check if anyone else has already written this script...what an amazing time saver this feature would be for me, since I am editing and uploading files all day long, on various web servers...

Cheers!

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: bbedit autoroute script?
« Reply #1 on: April 05, 2006, 04:58:37 AM »
Sure, here it is:

tell application "BBEdit"
   set thefile to file of front document
end tell

tell application "Yummy FTP"
   open thefile
end tell

Very simple... but it works!

Of course, this assumes that you've already set up AutoRoute in the Bookmarked servers you're using.

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: bbedit autoroute script?
« Reply #2 on: April 05, 2006, 12:17:31 PM »
The person who I originally wrote the AppleScript for emailed me back with the original script, which reminded me that I didn't tell BBEdit to save the document first... Thanks, Adam!

tell application "BBEdit"
   save front document
   set thefile to file of front document
end tell

tell application "Yummy FTP"
   open thefile
end tell

suzerain

  • Jr. Member
  • **
  • Posts: 5
Re: bbedit autoroute script?
« Reply #3 on: April 06, 2006, 04:35:50 AM »
Thanks a lot.  You might as well bundle some AppleScripts like this with the download; some people sould find it useful.  I'm a coder, but not an AppleScripter, so though I'd have figured this out, I just thought someone else would have already done it.

Anyway, I have been a Web developer for 11 years now...I use this stuff on a daily basis.  I am still using the demo, but I didn't think anything would ever make me switch from Transmit.  I'm still evaluating it, but I think this just might do it.  I noticed Transmit sucking more CPU than I thought it needed to on occasion, and this AutoRoute feature is something I thought about years ago, but never saw anyone build until now.

Good work...I dare say this software might just kick ass.

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: bbedit autoroute script?
« Reply #4 on: April 06, 2006, 06:54:43 AM »
Thanks, suzerain ;D

Good suggestion - I'll include this example script, plus some additional useful odds and ends, in the forthcoming major (free) update that I'm working on right now.