Input, control and automation

Tuesday, 22 December 2015

Tuesday, 1 December 2015

Stop the Music

06:57 Posted by Roxton , No comments
One of my favourite things about the internet in general and Youtube in particular is how easy they make it to be culturally decadent. For example, yesterday I was able to spend the afternoon doing exceptionally tedious and mundane legacy system work while listening to the 1958 Lisbon Traviata. It was like using the Bayeux Tapestry as a bedspread. However, into each life some rain must fall, and...

Thursday, 19 November 2015

Basic Speech Recognition Macros

02:21 Posted by Roxton , 2 comments
Back in 2012 I uploaded the video above, which showcased some of the functionality of a suite of Windows Speech Recognition (WSR) Macros I had written. There was some minor demand for the macro files, which I intended to share once I'd added some more features and polish. However, before this could happen my hard-drive failed, and, as I had been too stupid to take proper backups, the files were...

Thursday, 17 September 2015

VBA: 32,767 Leagues Under the Sea

04:38 Posted by Roxton No comments
A few weeks ago I attended a friend's stag-do in Dublin. He, I, and almost everyone else there had met while studying (in my case "attending" or "appearing on a register" might be a better description) at Imperial College, and we are all now techies of varying degrees of hardness (the groom does webby, 2.0-esque stuff, but we try to be kind). During a conversation I mentioned that as I was doing...

Tuesday, 15 September 2015

Arrays in VBA

06:02 Posted by Roxton , No comments
Judged entirely on its own merits, the implementation of arrays in VBA is neither significantly better nor worse than in most other scripting languages. They are, however, idioscyncratic in ways that seem specifically designed to confuse visitors - rather like the Paris Metro. Flicking back and forth between C#, C++, Java and VBA, I often catch myself using square brackets instead of parentheses...

Tuesday, 8 September 2015

VBA: Test if style exists in Word document

06:51 Posted by Roxton , , 3 comments
Frustratingly, there isn't a native function for testing whether or not a particular style exists in a Word document or template. The most direct and obvious way to work this out is to loop through all the styles in the document, thus: Dim style As Word.Style For Each style In ActiveDocument.Styles If style = "style_to_test" Then Debug.Print "style_to_test exists in this document" ...