Peter, Works like a champ for me as is—thanks for sharing it. Is it possible you used to have the Universal Access: Enable access for assistive devices option on and don't anymore?
On May 28, 2010, at 12:05 , Peter Weil wrote: > 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 [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.
