At 13:44 +0000 1/7/09, Mike Conley wrote: >Is there a way to attach a script to BBEdit such that any time a >file is opened, the script is executed? > <ftp://ftp.macnauchtan.com/Software/BBEdit/WorksheetOpen> tcsh <ftp://ftp.macnauchtan.com/Software/BBEdit/WorksheetShopen> bash <ftp://ftp.macnauchtan.com/Software/BBEdit/WorksheetOpen_ReadMe>
Those are shell scripts that will execute a few named lines embedded in a BBEdit worksheet. I have been using them for quite a while in the tcsh version and with bbedit up to 8.5.2. (I can't go higher because MacOS 10.4.+ refuses to talk to my SE/30 file server.) The concept works because worksheets make some trappable calls to create a process that becomes the underlying shell for the worksheet. Sorry. . . It has to be a worksheet. I typically have a worksheet opened at all times and in it reside lines that look like bbedit "path to working working file" Select and ENTER (which is a right mouse click for me) opens the file. New files get added to the worksheet and I have no trouble remembering what I was doing. It would be trivial to add the script you want to execute along with the bbedit command. What you can't do is to declare an ordinary file to be a worksheet and expect the saved file to be something that can be executed as an argument to cc or with a #! line declaring it to be executable. The format of a worksheet is a plist with mixed return/linefeed characters that confuse even bbedit itself. -- --> Life begins at ovulation. Ladies should endeavor to get every young life fertilized. <-- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a specific feature request or would like to report a suspected (or confirmed) problem with the software, please email to "[email protected]" rather than posting to the group. -~----------~----~----~----~------~----~------~--~---
