That's a very handy script -- thanks a lot, Jim. I wish I had a better handle on scripting BBEdit; most of the scripts I use (or have adopted) were originally written by other people.
I still think that enabling File->Save As for insta-projects (without further fiddling) would be useful. ;-) - Peter On Dec 1, 2009, at 2:59 PM, Jim Correia wrote: > On Dec 1, 2009, at 1:49 PM, Peter Weil wrote: > >> What I'm hearing is that he's asking for the ability to save the >> "insta-project" as a project at any time, without having to go through any >> extra steps. >> >> I think that this is a good idea, and could make the "insta-project" >> behavior/feature even more useful. Anything that facilitates/speeds up >> project creation would be a plus (not that the normal procedure is that >> horrible). > > Projects are scriptable. Before insta-projects, you could script the creation > of a project as necessary. > > You can drop a script in your Scripts folder that will let you take advantage > of the scripting interface to save an insta-project: > > tell application "BBEdit" > if exists project document 1 then > tell project document 1 > if on disk then > display alert "This project has already been > saved." > else > set defaultLocation to missing value > set defaultName to "Project.bbprojectd" > try > set defaultLocation to file of project > item 1 > set defaultName to name of project item > 1 & ".bbprojectd" > end try > if defaultLocation is not missing value then > set f to choose file name default > location defaultLocation default name defaultName > else > set f to choose file name default name > defaultName > end if > save to f > end if > end tell > else > display alert "No project open." > end if > end tell > > === end of script === > > - Jim > > -- > You received this message because you are subscribed to the > "BBEdit Talk" discussion group on Google Groups. > 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 feature request or would like to report a problem, > please email "[email protected]" rather than posting to the group. -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. 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 feature request or would like to report a problem, please email "[email protected]" rather than posting to the group.
