"There’s nothing in the middle of
the road but yellow stripes and dead armadillos."
Jim Hightower

Sunday, 22 October 2017

Saving PDFs from Apple Mail

I should have remembered how easy Apple makes things rather than starting off on a more complicated path.

I have a number of email invoices from an online shop that I want to store locally. I know that Spotlight indexes the email and I should be able to easily find these invoices going forward, but wanted to group the invoices with some other files - scanned receipts and documents.

I had been able to use the Mail option 'File | Save as a PDF' on each message, but there were 100 or so messages and I thought this would be tedious and spent a day investigating Automator and Applescript.

Long-story short, I had assumed (... breaking rule #1) that Mail would aggregate all the message if I tried to save more than one. It doesn't - just saves out each file as a PDF in turn.

So the easy solution is to save the file to a folder and then get Hazel to rename, tag and sort the files from there.

Saturday, 31 August 2013

Using Applescript in an Apple Mail rule

Just spent a few hours trying to figure out how to correctly fire a script from a Mail rule.

I was originally using this syntax from here as it seemed to be posted most places and used the handler construction that is similar to the one used by Hazel, but couldn't get the script to work.

on perform_mail_action(theData)
   tell application "Mail"
      set theSelectedMessages to |SelectedMessages| of theData
      set theRule to |Rule| of theData
      repeat with a from 1 to count theSelectedMessages
         — Process the current message
      end repeat
   end tell
end perform_mail_action

I eventually found this page with the following syntax that works perfectly - I should have known that Apple would provide an example script!

For reference "/Library/Scripts/Mail Scripts/Rule Actions/Sample Rule Action Script.scpt." is repeated here:

(*
Sample Rule Action Script
Copyright © 2003–2013 Apple Inc. All rights reserved.
You may incorporate this Apple sample code into your program(s) without
restriction.  This Apple sample code has been provided "AS IS" and the
responsibility for its operation is yours.  You are not permitted to
redistribute this Apple sample code as "Apple sample code" after having
made changes.  If you're going to redistribute the code, we require that
you make it clear that the code was descended from Apple sample code,
but that you've made changes.
*)
(*
This script is an example of how to write an AppleScript that can be
attached as a rule action. See Mail Help for details and Mail's 
AppleScript dictionary for the full terminology for the 'perform mail
action with messages' handler.
If you attach this script to a rule action, and the rule
matches an incoming message, a dialog box will display, showing
the name of the rule that matched and the subject of the message
that matched. One dialog per matched message will appear.
This is also an example of how you can write scripts that appear in the
Scripts menu and can pass in parameters for the selected messages and/or
mailboxes in Mail's main viewer window.
*)
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
set theText to "This AppleScript is intended to be used as an AppleScript rule action, but is also an example of how to write scripts that act on a selection of messages or mailboxes." & return & return & "To view this script, hold down the option key and select it again from the Scripts menu."
repeat with eachMessage in theMessages
set theSubject to subject of eachMessage
try
-- If this is not being executed as a rule action,
-- getting the name of theRule variable will fail.
set theRuleName to name of theRule
set theText to "The rule named '" & theRuleName & "' matched this message:"
set theText to theText & return & return & "Subject: " & theSubject
display dialog theText
set theText to ""
end try
end repeat
if theText is not equal to "" then
display dialog theText buttons {"OK"} default button 1
end if
end tell
end perform mail action with messages
end using terms from

Wednesday, 25 January 2012

Cross Country Trains: e-Tickets

I have just found out how ridiculous the e-Ticket and collection policy is for Cross Country trains.

I need to pre-pay for my daughter and her friend to travel back from school to her mother's home at the weekend. I will not be travelling with them as school is 100 miles south and my ex-wife lives an hour's drive away. They are 17, but do not have a credit card.

I can enter their details - Name & Railcard Number, when booking the ticket and I can email them the e-Tickets from my (valid) email address for them to print and take with them.

However, the tickets are not valid without my credit card.... This isn't clear in the payment system (see below) and is only made definite _when_ you receive the email after you're paid for the ticket...

25-01-2012 22-09-27

It is completely reasonable that they (a) have their rail cards to justify the reduced cost and (b) - perhaps, some other form of ID (though the Rail Card should cover both aspects) but not that my credit card has to travel with them!

I was told by customer service, when I called them as soon as I received the email notification, that as the advance tickets are non-refundable and non-transferrable; I have to write off the cost of the tickets or give my credit card to my daughter and friend when they travel. To do this, I would have to pay for two Special Delivery postages and be without my credit card for a week.

I have registered a complaint and am interested to hear their justification for the requirements.

Tuesday, 24 January 2012

Transferring Photos From An iPhone To Your Mac Wirelessly

I had some pictures on my iPhone that I wanted to copy to my work laptop, but had to get them on my MacBook to start with.

Plan A was to wirelessly sync my iPhone with the Mac and then email the files to my work account.

However, the Camera Roll on the iPhone is not synchronised with the Mac or iPhoto by default. You can use Photo Stream, but that locks the pictures in and doesn't allow you to delete the images easily.

There are several apps on the App Store that allow you to sync with DropBox, but it seems that the DropBox application does it natively for you, so I save my £1.99 and did it the free way!

Friday, 13 January 2012

How beautiful is this?

Saw this article today on how they’d created a garment from the silk of the Golden Orb spider. The colour is amazing.

Image from Wikipedia

Wednesday, 30 November 2011

Moshi Monsters and Apple's Parental Controls

I have a 8 year old that wants to access the Moshi Monsters site using Safari from a desktop locked down with parental controls on an OS X Lion Server.

Moshi Monsters seems to be predominantly a Flash based site that causes the parental controls software some problems. Several other people have found the same problem.

When we first tried to access the site, it was properly blocked and asked for permission. Once it had been added to the list of allowed sites, I thought it would all work.

However, once you log in to your pet, it gets locked at the "Loading" screen, but there isn't any further warning from the parental controls software.

If you look at the source code for the page, it is trying to load information from c.mmcdn.net and I wondered if this was causing the site to be blocked.

I thought if I added this as a bookmark, then the page would load correctly, but it didn't... After a bit of head scratching, I ran nslookup for 'c.mmcdn.net' from a Terminal window and it returned the following alias entries:

> c.mmcdn.net
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
c.mmcdn.net canonical name = c.mindcandy.cotcdb.net.
c.mindcandy.cotcdb.net canonical name = orig-10005.mindcandy.cotcdn.net.
Name: orig-10005.mindcandy.cotcdn.net
Address: 94.127.74.140
Once I added 'c.mindcandy.cotcdb.net' and 'orig-10005.mindcandy.cotcdn.net' to the list of bookmarks, the page loaded correctly.

I doubt this is a permanent fix as the Moshi Monster site may change its hosts, but at least it is a temporary work-around!

Monday, 26 September 2011

How do you know a rear brake light bulb has failed on a Land Rover Discovery 3…?

Simple, the car tells you.

The dashboard says:

  • Parking brake fault
  • HDC fault – Module not found
  • Transmission fault

And the car very helpfully drops the car on to the lowest suspension setting (i.e. the bump stops). This can be especially useful when you’re many miles from home. Mind you, someone will probably point out that it doesn’t make that _much_ difference to the ride quality.

My experience with BMW and Mercedes was that they simply told you that you had a bulb failure.

Interestingly, the Service Desk at the dealer (Guy Salmon in Coventry) didn’t recognise the faults as indicating a bulb failure either and referred me to Land Rover Assistance, as the earliest time they could help was the middle of the next week.Guy Salmon didn’t seem hugely concerned that I had a car that I couldn’t drive.

It must be a regular fault, as the ever cheerful Chris (from LR Assistance) had a very good look at the rear light bulbs when he showed up – 3 hours later. A visual check - with me pressing the brake pedal, confirmed his suspicions very shortly.

The whole experience did get quite close to farcical when Chris didn’t have any replacement bulbs with him and had to drive me to Halfords (for me) to buy a replacement set.

An amusing note was that during the conversation on the way to Halfords, Chris and I agreed that it was pretty poor design where a bulb failure takes out the whole car. When I asked if it was also an issue with the Discovery 4, the response was “… well, they’re fitted with LEDs now and they shouldn’t fail”, which neatly provided an illustration of the difference between an Incident and a Problem.

As an ex-Mechanical Engineer, I am dismayed that this wasn’t picked up during basic FMEA. Perhaps Land Rover have not come that far from British Leyland and 1987 where a sister company had passed a design where one fuse protected the headlights and the headlight washers…

So, for example, if the headlight washer motor had frozen up early on a cold, dark winter’s morning as you were happily motoring along the M1 with 3 lanes of solid traffic in your posh new Jaguar XJ40 and you were thinking “… my lights are looking a little dim, I’ll clean them up with my very clever headlight washer…”, you’d find out that the motor was frozen solid when all the headlights went out completely.

Funny how the engineers didn’t spot that in thousands of miles of Artic testing.

Wednesday, 8 September 2010

ReedsCo – New Updates

Reed Tan has recently updated his Maximum Visibility (MV) watch to a Maximum Visibility II (MV II) with a new movement; different face and hand options.
I think these offer a significant and welcome upgrade to the watch and have recently returned my V1 to be upgraded.
This was originally volunteered by Reed and shows the commitment to his brand and the excellent customer service he offers.

iTunes VAT receipts

If you’re a VAT registered business using the iPad and/or iPhone and are purchasing applications for business use or as part of your application development research, you’ll probably want a VAT receipt from Apple and will have noticed that all the receipts provided clearly state that ‘… this is _not_ a VAT receipt…”

In which case, you may be interested in the following article that describes how Jeremy Richards was able to obtain VAT receipts.

[Update 09/09/2010 – 10:00]

Received 2 VAT invoices this morning – out of a backlog of 8, along with an email stating:

Greetings from iTunes Store Customer Support. I understand that you wish to have a VAT invoices for your purchases. I can certainly see your concern. My name is Srinivas and I will do my best to provide you an appropriate information.

I would like to inform you that, the iTunes Store sells only to customers as end-users for personal, noncommercial use in their respective countries of residence. For more information, you can review the iTunes Store Terms and Conditions:

http://www.apple.com/legal/itunes/ww

Thank you for being an iTunes Store customer. Apple appreciates your business and understanding in this regard.

Regards,

Srinivas

iTunes Store Customer Support

I have replied using Jeremy’s erudite response template …

Dear Srinivas

Many thanks for your reply. Whilst I understand that your terms state that the applications are for personal use I would like to draw your attention to the Apple website that refers to business applications on many occasions. Just look at all these applications on offer. This part is on the iPhone tab 'With iPhone, you get secure corporate network connectivity, access to thousands of business apps, and tool for developing your own company apps.' Are you really telling me that you are selling people apps that they are not allowed to use?

It is irrelevant whether I wish to use my purchase for personal of business benefit. I am a VAT registered individual and I am requesting a VAT invoice. By UK law you have to supply me with one. Please see the [tax office website] for confirmation.

I note that you have already sent me VAT invoices for transaction IDs:

<Invoices Received>

I am currently missing VAT invoices for:

<Invoices Missing>

I look forward to receiving them, etc…

There’s also a similar experience posted here.

[Update 09/09/2010 – 16:00]

All missing VAT receipts received…

Monday, 23 August 2010

Fibre to the Cabinet

Given that the speed on my broadband connection has reduced from 2.1MB/s to 841KB/s over the past 12 months for no obvious reasons – the service provider always claims the line length as the issue, I’m really looking forward to BT’s roll-out of Fibre to the Cabinet (FTTC).

If you’re interested in finding out when you’re schedule to go live, then there’s a list here  - I should be patched in by 31st December 2010. Fingers crossed that BT are ahead, rather than behind schedule!

Thursday, 5 August 2010

Pixmania – Buyers beware!

Be very careful when buying from Pixmania. For sure, their prices are very competitive, but the goods are shipped from France… and sometimes they’re selling the French version. It is normally noted on the page for the item:

Pixmania 02

This means that:

  • They’ll send you an adapter plug (European to UK) that you have to fit yourself – a minor effort

What they don’t tell you is that:

  • The goods will have French manuals included. You may get lucky and have the English manuals included as well, but a lot of manufacturers are only shipping the manual for the locale to save weight and costs.
  • The number given on the order confirmation email is ‘no longer in service’

    Pixmania 01

The correct number is 0844 369 0372 and it is possible to contact customer service via email as well – first you’ll have to log in with the email address and password you created when you purchased the item.

Calling the Customer Service number is fun too, the system doesn’t respond when you enter the order number and keeps asking for it to be repeated. Eventually, you’ll get to a message that says “All our operators are busy, please call back later” and you’ll get cut off.

I’ll let you know how I get on with sourcing a UK manual…

<Update> In the end I gave up with Pixmania and downloaded the PDF from the manufacturer’s web site.

Tuesday, 6 July 2010

User Interfaces

I use DxO Optics Pro for processing my camera images as the second step in my digital workflow after importing the files in to Lightroom.

I was originally introduced to it by Ken Rockwell and it does a great job of correcting the lens errors and gives excellent results, but it doesn’t currently include one of my lenses – a Nikon 35mm  f/2, so I used the DxO site to register my interest for a module for the 35mm.

It is very easy to do with an online form to be completed.

The bit that foxed me was the spam check at the bottom of the form.

DxO

The attempt show above was the fourth or fifth one I’d tried… It seems that you need to type all the characters in upper-case. Obvious!

Sunday, 27 June 2010

ReedsCo – An update

I’ve posted an update to my experience with ReedsCo here. I’ve quoted my comments in addition below:

The watch has been back to Reed and returned. Apart from a very minor glitch that happens when setting the time, where the hands move as you screw the crown down (this only happens very occasionally), the watch has been running reliably and keeping perfect time.

Overall, great service from Reed and (in the end) a very good, working watch that gets plenty of positive comments.

Friday, 9 April 2010

Honda Lawnmowers…

Mainly due to my own laziness and not finding enough time to take it somewhere to be serviced, but my usually reliable Honda lawnmower had developed a habit of cutting out periodically. 30 seconds to 1 minute seemed to be the period that it had settled on, but always happy to restart after a tug on the starter cord.

The lawn here is very small and the balance between the inconvenience of the mower cutting out, getting the lawn cut and the time out to (a) find somewhere to get it serviced and (b) to then deliver and collect the mower were all in reasonable balance.

Having looked after and fiddled with cars since I was 17, (I like to think) I’m quite adept at figuring out the problem and fixing it myself.

This issue, however, had me stumped.

From time to time, I would strip down the carburettor and fuel system; clean out the fuel tank; adjust the throttle cables; clean the plug and fiddle with the wires.

Everything seemed clean and tidy and in good working order.

But, the problem persisted.

Last weekend was the first cut of Spring and the mower seemed to have settled on every 10 to 15 seconds as a reasonable running period, which was little too far out of balance even for me.

Google to the rescue.

I searched for ‘Honda HRB runs then stops’ and the first link had the answer – JustAnswer. Right near the bottom of the thread, the comment;

I decided that the fault must be electrical so I started by changing the Spark plug and that has cured the problem.

A second check on an alternative Google hit on DoItYourself confirmed the solution. Well enough for a trip out to Halfords.

Mower ran perfectly once I’d changed the plug.

Monday, 29 March 2010

Picture Hanging…

Over the weekend, we moved a few pictures around in the house and hung some that had been waiting for us to find a suitable place.

We hung one large oil picture (140cm x 110cm) in a stairwell having run out of wall space in the rest of the house.

At a guess, I’d say it weighs between 15 and 20kg (30 and 70lbs) as I can lift easily it by myself and hold it against a wall without much difficulty.

After I’d hung it using 2 off No. 3 ‘X’ Hooks (with 2 nails) about 80cm apart it seemed secure enough and I moved on to other jobs…

My subconscious had other ideas and prompted me, as a I was waking up this morning, to double-check and figure out whether the picture would stay fixed to the wall!

After some ‘research’ (i.e. Googling for ‘picture hook SWL’ and ‘picture hook pull out’) I found Danny Lipford (there are other references 1) who has done some testing and has found that the pull-out load on a single nail picture hanger is between 60 and 80lbs (27 and 36kgs) with a Safe Working Load (SWL) – or as it is now known Working Load Limit (WLL), of about 10 to 30lbs less (4.5 to 14kgs).

Danny said the “While the fasteners pulled out of the wall at the pounds listed (except for toggles, which remained intact), they started showing signs of failure at 10-30 pounds less…

Danny didn’t say which hooks the load reductions applied to, but I’m going to assume the 10lb reduction was on the small hook and the 30lb reduction was on the large hook.

This would give a general WLL of 50lbs (23Kgs) for any of the hooks.

If I can remember back to my Strength of Materials classes; the load divides evenly and that although the vertical load of 10kgs will place a side load on the frame and tension in the wire, in this case the hooks act as pin joints and only react the vertical loads.

This would mean that each hook is supporting a maximum of 10Kgs (22lbs) with a safety factor of between 2.3 and 3, which I think is acceptable given the pictures location and likelihood of it receiving extra load (aka children – or adults, fiddling with it!)

Footnotes

1 – I also found the exactly same tests reported here, but neither quote an original source and couldn’t determine who should get the reference.

Tuesday, 16 March 2010

Absolute Sonos

I have a small Sonos system at home, with a bridge, two zones and one controller. Although the zones form their own mesh and have a level of resiliency, the weak link in the chain (in my installation) is the bridge from the Sonos network to the home network and NAS where the MP3 files are stored.

Unfortunately, the last time I powered up the computer system after fixing a plug, there was a loud bang from underneath the desk as the power supply to the Sonos Bridge blew up.

When I rang Absolute Sonos to source a replacement, they very kindly sent one out FoC. I thought it was very kind & generous – certainly somewhere to go when I expand the existing system.

The system is now working perfectly again. Thank you.

Wednesday, 24 February 2010

ReedsCo – A work in progress – Part II

I received a call from Geoff Allnut on Friday. The news wasn’t good…

“I’ve taken the back off and can see that the watch has a Chinese movement. I can’t get spares for these in the UK, so suggest you send it back to ReedsCo in Singapore”

Geoff liked the look of the watch but felt that the Chinese movements are not as well made as the Swiss ones. When I asked about how difficult it was to retro-fit a Swiss movement in to the watch, Geoff said “very”.

So back to Plan A. Reed is happy to repair the watch and I’ll send it to him over the next few days.

Update – 26th June 2010

The watch has been back to Reed and returned. Apart from a very minor glitch that happens when setting the time, where the hands move as you screw the crown down (this only happens very occasionally), the watch has been running reliably and keeping perfect time.

Overall, great service from Reed and (in the end) a very good, working watch that gets plenty of positive comments.

Thursday, 18 February 2010

ReedsCo – A Work in Progress

They say that in football that it is a “Game of two halves” and it seems that my watch is similarly one of two parts…

I had left the watch for a couple of days whilst I was abroad; it had stopped and I needed to set the time.

ReedsCo - MV Series - Crown + ShaftI unscrewed and pulled out the crown the two clicks to engage the hour hand; set the time and pushed it back in. It didn’t seem to be sitting properly, so I pulled it out again. At which point I had the following in my hand.

Reed Tan was very apologetic and has agreed – to save on the postage between here and Singapore, for me to get a local watch maker to refit the crown + shaft.

I have used Geoff Allnutt on several occasions and he provided great support. I’ll let you know what he says.

Tuesday, 9 February 2010

Watch links

My brother recently sent me some great links to watch based web sites. I thought they might prove useful or interesting for other people.

SteveG's Watch Launchpad

This link takes you to a chaotic start page crammed with may different watches, but it’s worth exploring the links as the detail photography is superb.

MK II Watches

A watch micro-brand specialising in diver style watches.

Second-hand Heuers

A couple of great sites for second-hand Heuers

Breitling Navitimer

The is a great site tracking the history and models of Breitling’s Navitimer range

Rolex

A fully comprehensive site covering Rolex watches

Japanese Watch Photo Database

The watch photo database contains thousands of images that have been contributed by members of watch forums and from a wide variety of other Internet sources.

There are great some reference Seiko, Citizen and other catalogues here too.

Friday, 5 February 2010

Amazing how accurate Dilbert can be!

Although I’ve been happily in a relationship for the past couple of  years, I was on the dating scene for a little while.

This cartoon in yesterday’s desk calendar was very true of my experience. The next one I need to find is the one about free dinners and trips out!

Dilbert - Dataing Engineers

I did check Dilbert’s site before posting & think this is shown within the Terms of Use