Monthly Archives: June 2006

here i am. no i’m not

Well, the issues with my ADSL line are getting worse: it seems to loose DSL sync randomly and no combination of phone sockets or microfilters appears to help. This means that email may be delayed by two days or more (although I do now have backup MX thanks to GratisDNS), and the web site(s) will not always be available :(

Still, the good news is that it’s so nice to have an ISP that isn’t run into the ground by PHB’s: yesterday I called support (for the first time) and was rather worried by the ‘Press 1 if you are using a Mac’ voice menu, but I didn’t need to worry:

Support: Hello. How can I help you ?

Me: I’ve got a problem with my router. It doesn’t pass the ATM loopback test

Support: Which model do you have ?

Me: A Zyxel 650

Support: Ok, I can test the line, but it’ll take two minutes or so

And they did ! The line passed, so they wanted to go through some testing with me that involved a router factory reset, but I said it was going to take a little time as I was set up for static IP’s, so without any discussions he helpfully went though all the steps I needed to take in order for them to be able to raise a fault with BT, including telling me which socket and connector BT would be using to prove/disprove any fault reports so I could do it in my own time.

As it turns out, I couldn’t get it back even after all of the extra steps, but had to go out before I could report anything – on the way back there was a BT Openreach van parked next to my green box, so I tried again when I got back in, and it started working again. About 11pm last night it vanished again, and was brought back this morning by a router power cycle although the software reset option appears to have no effect now. Assuming it’s not an engineer induced fault (boy, do I have a list of those from numerous BT installs over the years at work) then it’s looking likely that the router is dying: if this is the case then I’d expect this random availability to continue for the next week or more.

Share

infrared basketball

Whilst I’m in a positively frenzied posting mood, I’ve ended up emailing this link to more than one person which is the usual indicator of “should have blogged it”. Yes, months after I first read it on Rob Galbraith’s site, here’s a fascinating use of IR photography that just makes me want to get a second camera just to have it converted for full-time use:

http://www.sportsshooter.com/news/1570

Share

gui scripting – urgh

I like RapidWeaver and really like the idea of static pages for my website (it’s not as if I update it that often !) but I also have one or two posts in WordPress that I don’t want to loose. Currently, there is no AppleScript or Automator support in RW and the plugin dev kit is not yet out[1] (it’s promised for v3.5, but the current application release is v3.5 Public Beta 1) so I thought I’d try a little GUI Scripting.

Hooboy. It’s harder than AppleScript, but then I find AppleScript hard anyway as I’m a person who never managed to complete an Infocom text adventure. Yes, of course it’s plain English, but after trying the fifteenth variant of get (pickup, take, hold, grab, steal, nick…) and still getting “I don’t understand” I just went off to do something easier and more obvious. Like 6502 assembler and Forth.

AppleScript is like that: maybe if I spoke a more US variant of English it’d be easier, but GUI Scripting takes it to a new level as it’s necessary to switch from ‘plain’ English to a more computer-oriented variant as there is no easy way to describe UI elements without using the names that have been given to them. Take the following, for example:

tell application "Finder"
	activate
end tell

tell application "System Events"
	tell process "RapidWeaver"
		activate

	set projectName to "test.rw3"
		set postTitle to "This is my post title"
		set postCategory to "Photography"
		set postBody to "This is my post body (ie: the content)"
		set postDate to "1970/01/02 11:22:33 +0000"
		set postPermalink to "this-is-my-post-title"

	delay 4

	click button 1 of splitter group 1 of group 1 of splitter group 1 of splitter group 1
			of window projectName
		set tf to text field 2 of splitter group 1 of group 1 of splitter group 1 of
			splitter group 1 of window projectName
		set value of tf to postTitle

	set tf to text area 1 of scroll area 1 of tab group 1 of splitter group 1 of group 1
			of splitter group 1 of splitter group 1 of window projectName
		set value of tf to postBody

	click checkbox "Custom Permalink" of tab group 1 of splitter group 1 of group 1
			of splitter group 1 of splitter group 1 of window projectName
		set tf to text field 1 of tab group 1 of splitter group 1 of group 1 of
			splitter group 1 of splitter group 1 of window projectName
		set value of tf to postPermalink

	set pb to pop up button 1 of splitter group 1 of group 1 of splitter group 1
			of splitter group 1 of window projectName
		tell pb
			click
			keystroke down
		end tell

	set df to UI element 1 of splitter group 1 of group 1 of splitter group 1
			of splitter group 1 of window projectName
		set value of df to postDate
	end tell
end tell

That ought to be enough to create a new blog entry, fill in the title, custom permalink, body, category and date. What it does do is create a new item, set the custom permalink flag, occasionally fill in the custom permalink text itself, and throw the date into the search field. This is even with the help of the 30 day trial of UI Browser – in fact, without that trial I don’t think I’d even have got this far.

The result ? Well, I think I’m going to give up on this totally unless anyone else has some better tips for getting this sort of thing automated and wait for the dev kit and write a plugin to grab the posts directly from the WordPress database and leave it running as a non-public backend (or possibly translate the posts into a format that the normal blog plugin can use: it depends on how much sample code comes with the dev. kit).

[1] Ahem. The SDK is now out

Share
Page 1 of 11