Mostly, the scripts rely on shell commands. For instance, I ask the "top" command for CPU information, and the "memstat" command for ram details, and iReg for battery, and so on. Once I get the results, I grab the bits I need, and return those (all this happens in the Get Info.scpt file, which is why it *must* be int the same folder as the scripts).
Then, I have the raw information, like the amount of ram or the battery level, and I give it back to the script that asked for it. The script then gives all that raw data, plus the template, to a couple functions in Utilities.scpt (another required file). The raw data is paired up with keywords, those keywords are sorted and searched for, any any that are present are replaced. This is how $minutes turns into 15, for instance. Once the template has been populated, the complete string is given back to the script you ran, which asks Utilities.scpt to speak it. The speaking part checks if VoiceOver is running; it tells VO to say the string if it is, and tells the default system voice to do so if it's not. > On Mar 5, 2015, at 12:53 AM, Eugenia Firth <[email protected]> wrote: > > Hi Alex > I am under Yosemite, and have the latest update. I know how to use the time > and date file, and I know how to use the battery one. This is going to sound > like a really dumb question, but could you give me and some others who are > sort of in first grade when it comes to Apple script some idea of what > commands make the others work? Or, is that all in the read me file that I > read a long time ago? > > Gigi > ? >> On Mar 4, 2015, at 10:31 PM, Alex Hall <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hi all, >> Most of you know about what I (rather un-creatively) call Talking Dashboard, >> a set of Applescript files that give you access to information. There's a >> time/date one, one for battery, one for current wifi status, and more. Most >> of you also know I've wanted to add a script for upcoming reminders and >> calendar events, but I could never get it working right, and I didn't like >> that it would always force Reminders or Calendar to launch. >> >> Well, the good news is that I can overcome both problems (most likely, but >> no promises) by accessing the EKEventStore through Cocoa. If that's Greek to >> you, the bottom line is that I can probably do this, but it requires OS10.9 >> or later, maybe even 10.10 or later. I'm on 10.10, but I'm wondering how >> many people this would affect? Existing scripts would continue to work, but >> if I find a faster/easier way to do what they currently do that also uses >> Cocoa, I'll do it. Plus, I could probably revamp and expand the template >> system, since I would no longer need to use my own hacked-together solution >> but could instead use a real, Cocoa-based one. I'd probably archive what I >> have and put the existing scripts in a subfolder, so those who can't run the >> new ones don't need to, but I would no longer support them. >> >> So, basically, if you use Talking Dashboard, on which version(s) of OS X do >> you use it? >> >> -- >> Have a great day, >> Alex Hall >> [email protected] <mailto:[email protected]> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "MacVisionaries" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] >> <mailto:[email protected]>. >> To post to this group, send email to [email protected] >> <mailto:[email protected]>. >> Visit this group at http://groups.google.com/group/macvisionaries >> <http://groups.google.com/group/macvisionaries>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > > -- > You received this message because you are subscribed to the Google Groups > "MacVisionaries" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at http://groups.google.com/group/macvisionaries > <http://groups.google.com/group/macvisionaries>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- Have a great day, Alex Hall [email protected] -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout.
