I'm going to research the interprocess communication in Phab. I can write dummy replacements for each of the Audrey apps, and display any interprocess communication that is going on between them. That way we can at least know what's being sent back and forth.
But it's possible to do all this without buttond or any Audrey app since the buttons are actually F1 keys. Here's what I suggest:
1. All of the apps we write for the Audrey (or those that participate in this "poor man's" button support) should first search for a copy of itself that is already running and if found, switch to that app and then terminate. That way, you can only have one copy of an app running.
2. Apps should all read settings from a predefined settings file (i.e. /kojak/appswitch.init or whatever name we come up with), that has each key defined with a program to start. For instance, the contents of the file would be:
When a user presses that key (which would be a button press), the application executes the command line and starts that app. When the app is started, it would behave as in point #1 above and bring the app to the front if it is already started or start itself.
Ta-da! Customized application switching without any need for "interprocess" stuff.
Now, I know what you're thinking. This will work great with all the custom apps that have been written, but what about the existing built-in Audrey apps? Well, you're absolutely correct... this won't work with those! But hey, it's just a start, it can be a way of activating button support while we study the "interprocess communication" thingies and come up with a way of supporting all the apps...
What does everyone think?
PS - I went ahead and posted the sketchpad app, as requested, even though it's not finished. http://audrey.hammoco.com then click on the "Downloads" button.