Hello again, I'm moving my set of scripts to Yosemite. This way I can use Cocoa, check for AS version on the user's machine, and so on. I'm thinking that, as part of the process, I want to move away from a zip file and into a bundled script model, but I want to check a few things before I do that.
Each script in my set is meant to speak some bit of information; one says the time and date, another the CPU load, a third the current wifi network and signal strength, that kind of thing. These are intended primarily for VoiceOver users, since the Status Menus are just plain awkward to access quickly. Thus, users normally assign each script to its own keystroke or other launch method. All the scripts, however, rely on two files. One is used to get system information, and the other includes functions for the template system, converting numbers to megabytes or gigabytes, and other utilities.
1. I distribute this set of scripts as a zip file right now. This lets users assign each one to a keystroke, duplicate scripts to have different copies do different things, and so on. The problem is that the two required script files can be left behind as users pick which scripts they want to use, plus every script requires an import method pasted at the end, and I hate seeing duplicated code like that. I'm intrigued by the idea of making a bundled script, so that the two libraries I need can be bundled with the scripts. I can also keep track of the current version with a bundle, and (almost) ensure that users are always running the current versions of the different scripts. If I do this, can users still assign individual scripts, or does a bundle work differently? Is it just a matter of ctrl-clicking the bundle and finding the scripts in there, or is there an easier way?
2. I see that I can save a single script as a bundle, but what if I wanted to save ten or fifteen scripts, all in a single bundle with a single plist file? Is there a way to do this, or would I save one and then add the rest of the scripts manually?
3. Given the average use case, are there any down sides of doing this? Is there an even better approach I'm missing? As I said, requiring Yosemite or newer is not a problem; I'll just archive what I have now for Mavericks and older, and concentrate on this updated set moving forward.
4. Slightly unrelated: if I say "use AppleScript version "2.3"" in a script, is that version an exact or a minimum? That is, what happens to scripts using 2.3 in this way when, say, 2.5 comes along in OS X 10.11?
--
Have a great day, Alex Hall
|