December 19th, 2006
A few months ago, Cameron Hayne told me about his nifty AppleScript Shell (ash), which offers an interactive command-line interface to AppleScript, and lets you do some nifty tricks like “tracing” a script’s execution, printing the resulting value for each executed statement.
But I just discovered something about ash that’s truly magical. Think “Remote Script Editor”! I’m in a hotel when I realize I need to access some information from an Address Book entry back home. So I ssh into my home computer, and start slogging through the Address Book data folder. Ugh! If only I could easily ask for the scripted information I need. Of course, there’s osascript, which is where I started heading. But ash makes this process so much easier, because of its interactive and forgiving interface:
iBook> ./ash
Welcome to ash (AppleScript Shell) version 0.60
Type: -help for help, type -exit to exit
ash> tell application "Address Book"
tell application "Address Book"
ash tell> set myPerson to first person whose name is "John Doe"
tell application "Address Book"
set myPerson to first person whose name is "John Doe"
ash tell> value of phones of myPerson
tell application "Address Book"
set myPerson to first person whose name is "John Doe"
value of phones of myPerson
ash tell> end
tell application "Address Book"
set myPerson to first person whose name is "John Doe"
value of phones of myPerson
end tell
{"(415) 555-1384", "(415) 555-4424"}
ash>
See how ash takes one line at a time, and then when I end the “tell” block, it shows me the results of my query. Now I can call my friend even though I’m nowhere near my Mac.
Yeah, yeah, yeah. Or I could run VNC, or ya know, put phone numbers on my iPod. But this is just one example of a scenario where interactive scripting could be handy through a remote ssh connection.
AppleScript Shell, check it out!
Posted in AppleScript, Hacking, Uncategorized | 9 Comments »
December 18th, 2006
Phew! I was traveling today so I didn’t get a chance to blog this earlier. MacSanta is an awesome chance to buy Mac software from … literally dozens (27 so far) of independent software companies, all at 20% off.
Red Sweater is participating, and all you have to do to score the big discount is use the MACSANTA coupon code.
Because my online store is not very sophisticated, I am unfortunately only able to offer the deal to customers who purchase through the my Kagi Web Store. Enjoy!
Posted in Business, Red Sweater News, Uncategorized, Web | Comments Off on MacSanta
December 16th, 2006
Most of the time when I download some new piece of software, it’s mere seconds before I’m frothing at the mouth about some interface or usability problem.
Which makes me sit up and take notice when a piece of software just does something damned elegantly, damned easily, and damned beautifully. Bwana, from Bruji, is one of those pieces of software.
Bwana is a UNIX man page reader. I’ve tried them before, and been underwhelmed. They try to take over hot keys on my system, or leave some UI application running all the time. I’m not that into man pages. What Bwana does is brilliant: it uses your web browser as the interface to beautifully formatted HTML renditions of your system’s man pages. I just type, for instance, “man:diskutil”. Since I’m always running a web browser, it doesn’t hurt anything to have it suddenly able to show me man pages. And the pages look fantastic.
Even better, it’s been recently made open source. So I guess I can fix my only complaint, that a “not found” man page doesn’t automatically bring up a list of substring matches.
Update: I decided to go ahead and implement these changes. Download my modified sources for a version of Bwana that, when it doesn’t find an exact match, presents a filtered index of man pages whose names contain the substring.
Nice work, Bruji.
Posted in Programming, Software Reviews, Usability | 8 Comments »
December 16th, 2006
An ability to export audio to iTunes has been part of my vision for FlexTime since the very beginning. How cool to be able to design a custom pattern of sound cues, send them to iTunes, then take them with you on your iPod?
I’ve been hard at work on this feature, and I’m nearing completion. Just some fine-tuning and bug-fixes. But I’m not going to be able to find the time to finish up until probably sometime next month. I know many FlexTime users have been waiting patiently for this feature, so as a compromise I’m releasing a beta version with the feature as it exists so far.
Download FlexTime 1.2b1
To use the feature, just select “Send Audio to iTunes” from the Routine menu:
The audio from any “Play Sound” or “Speak Text” cues will be arranged into an audio file the length of your routine, and sent to iTunes. The audio file is meant to sound roughly the same as what you’d hear if you pressed play from the beginning in FlexTime, and allowed the routine to run all the way to the end. I don’t incorporate repeats because I figure you can use iTunes or your iPod to repeat the track as necessary.
Among the known bugs is a problem where “Speak Text” cues do not show up in the exported audio on the first try. Just export again and they should be in there.
Let me know if you run into any issues, or have any last-minute suggestions for improving the feature.
Posted in FlexTime | Comments Off on FlexTime 1.2b1