I am working on a small project involving 20-25 Applescript scripts that share some code with each other. I am looking for the best practices and a better way to organize the scripts so that it is most convenient for the end-users.
Background: I have a few Microsoft Excel files containing macros. I normally assign macros to the buttons in Excel document and activate the macros from there. I also have macros that run automatically on opening each document. (Excel 2008, Mac OS X 10.5.5)
I plan to provide similar actions via Script menu in menu bar by placing files in the Scripts folders under Library and Microsoft User Data folders.
How should I share the code across files?
One way is to put handlers in a file and call those handlers from other scripts. The problem with multiple files is locating them on the disk as users may move the files.
Is there a better way? Can Script Bundle and Applescript Application formats be helpful in this regard? How can I make compiled Applescript library containing multiple files and will it be suitable in this case?
How should Excel users access the script actions?
I can place all the code in a single long Applescript file to avoid above issue. But in that case only one action will show up in Scripts menu under menu bar. Is their a workaround? Are their other ways to provide a better experience to users familiar with VB macros in Excel 2004?
I have worked with individual standalone scripts for quite some time but this is my first attempt at preparing a small project for end-users. I look forward to your help and comments. Thanks.