Last December, Jim Correia generously provided me with this very useful AppleScript for saving and naming an insta-project. It used to work great, but now under BBEdit 9.5, it's generating an error:
"Project document 1 doesn't understand the <<event sysonwfl>> message"
Does anyone know how to fix this?
> tell application "BBEdit" > if exists project document 1 then > tell project document 1 > if on disk then > «event sysodisA» "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 «event sysonwfl» given «class dflc»:defaultLocation, «class dfnm»:defaultName > else > set f to «event sysonwfl» given «class dfnm»:defaultName > end if > save to f > end if > end tell > else > «event sysodisA» "No project open." > end if > end tell
I should note that the original script read like this. I don't know how it got changed. Under BBEdit 9, this script will not compile:
> 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 >
-- 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 bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscribe@googlegroups.com 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 "support@barebones.com" rather than posting to the group.
May 28
Lorin Rivers Re: script for saving insta-project
May 28, 2010; 13:57
Lorin Rivers
Re: script for saving insta-project
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!