Whilst I am waiting for the latest working version of the econd Life Client Thing to squeeze itself through the Aethernetical Pipes and plop onto my desk, I suppose that I might as well write a little about my experiments with automated photography, mentioned previously.
It has been said by myself (and, to be fair, others) many times that there is no way for a Script to take a Picture, and this is, speaking strictly literally, true. Scripts cannot take Photographs. However, there are ways of getting around this issue, as I have found recently.
The procedure at base works along the following lines: a script, as is generally known, can send a message to an outside Aethernet Server. That server can retain the message that is sent ("take a picture please"). One's own personal Engine can also receive messages from the same Server, and one's own Engine is furthermore capable of taking pictures - at least, of the current screen, not nearly as good as the in-world photography tool but hey ho.
To this effect I have an attachment which, at regular intervals, sends off a message to my own Server containing my current whereabouts. I also have a small program running on my own Engine, which contacts my Server regularly and says "are there any messages waiting?" If so, it downloads the information, takes a picture of my current screen, resizes it to appropriately small dimensions and writes my location onto a little bar at the top (also disguising the ugly top-of-the-window part of said screenshot). Since the aim here is to create a record of my activities for my own enlightenment, it also saves the location and a few other data to a daily log.
The time delay between the making of the request and the taking of the screenshot is less than ten seconds, which is not too bad, though it does mean that my precise location is not precisely appropriate to the screenshot, but, well, hey ho again. More rapid polling of the server would help to eliminate this. Oh - the attachment that I wear can be turned on and off, as well. After it sends my location to the Server and my Engine receives it and takes a shot, that information is then deleted from the Server, so when information stops being sent no pictures are taken.
Finally, when all is done with, the pictures are thrown together in a pile and turned into a piece of Cinema, which speeds up my activities dramatically, one minute becoming one second of time. Here, for instance, one might see me building things, then being unsatisfied with them and deleting them (a common pastime):
For technical types, the script on my own Engine is written in Perl, using
curl to access a page on ordinalmalaprop.com, then using the OS X utility
screencapture (helpfully pointed out to me by Mr Westbrook of the Electric Sheep) to, er, capture the screen. The ridiculously cryptic yet powerful program
mencoder is used to compile a video for the day. Should I have the time it would be more efficient for the thing to run using
launchd or some such but to be fair, I am not terribly good with these particular tools and have concentrated more on getting it to work in the first place. Addendum: In practice, to produce the above, I actually used
ffmpeg, which has options to pad the pictures to the correct size, and may switch to the use of that tool in general.
Ah - I see that the older client is sitting on my desk as I write this, wailing away in its birth throes, and I must attend. Actual scripts etc to follow.