Saturday, July 17, 2010

Creating a Time-Lapse Video of Screen Captures

I recently came across a really interesting web site that provided a graphical representation of real-time electricity prices in the wholesale market (something relevant to my day job). The image updated every five minutes, which gave you an interesting real-time perspective. However, there was no option to view past data for a historical perspective. That was disappointing to me because as cool as it was to see the data in real-time, it had a much more significant meaning when compared to recent history.

That inspired me to find a way to capture the screen image every so often and assemble a collection of the images together to view as a video. That couldn't be hard to do, could it?

Well, it really wasn't that hard! Here's how I accomplished the task.

The web site that I wanted to capture the image from uses the Adobe Scalable Vector Graphics ("SVG") viewer. This plugin requires the use of Microsoft Windows and Internet Explorer (Yes, I know it will run on older version of OS X, but we're talking circa 2001 folks; I've updated my operating system since then!) Requiring Adobe SVG was very disappointing since I run mostly Apple Mac OS X machines in my home office. However, I use VMWare Fusion to run Windows 7 Ultimate on the Mac Pro and I also keep an old Sony Vaio desktop around to run Windows 7 Home Professional for these purposes.


For several years, I have used a very powerful and easy-to-use Microsoft Windows screen capture application called MWSnap. Windows 7 does include a built-in screen capture utility, but it is extremely simple and lacks many of the functions that can be found in the basic MWSnap application. The most significant function is the file naming capability. MWSnap allows the use of variables for date and time allowing you to automatically time-stamp the image file. The application also allows you to automatically save the image that you capture. The very best thing about the MWSnap application? It's freeware with donations accepted. Wow! With these features, we were halfway there.

Now we needed a way to automate the screen capture process. Enter the wonderful Windows freeware utility, AutoHotkey. This handy application allows the user to create a script of keyboard and mouse commands along with a powerful set of logic controls to automate almost any process on a Microsoft Windows computer. Although the application has an extremely robust set of features, we only required a relatively simple set of keyboard commands. Through trial and error, we found the biggest trick was to include several pauses to provide Windows or the subject web site sufficient time to respond to the AutoHotkey commands; a simple, but important point for you to remember.

AutoHotkey allows you to create a command script in a text file. Then when you select that script from File Explorer, the application will begin the execution of your custom AutoHotkey commands. For our purposes, we needed to perform a few different tasks. The Adobe SVG plug-in on our subject web site was set to automatically refresh the graphic image every five minutes. However, we found that this process appeared to stop on its own after an hour or two. We decided the best thing was to force a browser screen refresh; launch MWSnap; send the keyboard commands to MWSnap to select and capture the browser screen image (automatically saving the image file with a date and time stamp); and then close MWSnap and patiently wait five minutes to begin the process over again. We included a loop to execute this set of commands for a certain number of hours.

The AutoHotkey script file that we used was very similar to this:

; Pause 5 seconds before starting.
; This will give you time to close the File Explorer window and
; place your mouse pointer in the window that you want captured.
    Sleep, 5000
; Loop ( 36 hours = 432 interations )
    Loop, 432
    {
; Refresh the browser window
    Send, {F5}
; Pause 10 seconds ( 1 second = 1,000 )
    Sleep, 10000
; Page down to view the desired image
    Send, {PGDN}
; Pause 5 seconds ( 1 second = 1,000 )
    Sleep, 5000
; Open the MWSnap application
    Send, {LWIN}
    Send, mwsnap {ENTER}
; Pause 5 seconds ( 1 second = 1,000 )
    Sleep, 5000
; Select image in browser window
    Send, {ALT}
    Send, c
    Send, w
; Pause 5 seconds ( 1 second = 1,000 )
    Sleep, 5000
; Capture image and autosave according to MWSnap settings
    Send, {ENTER}
; Pause 5 seconds ( 1 second = 1,000 )
    Sleep, 5000
; Close the MWSnap application
    Send, {ALT}
    Send, f
    Send, x
; Pause ( 5 minutes = 300,000, but subtratct the time spent pausing in the script )
    Sleep, 270000
    }

You may find the AutoHotkey script commands very intuitive. If not, a quick read of the well-written documentation in the help file will quickly get you on your way to writing your own command scripts.

After testing the script a few times, it was simply a matter of navigating to the subject web site, firing-off the AutoHotkey script and letting MWSnap capture the images as planned. In the case of my script, 36 hours later I had all of the images that I wanted.

At this point I copied the image files to my Mac Pro to be imported into iPhoto, and then into iMovie where the images were easily assembled into a MPEG-4 video with informative title slides and smooth transitions. I assume that Microsoft Windows Live MovieMaker has similar capabilities, but it is an application that I have not used for many years. If MovieMaker doesn't meet your needs, there are a number of third-party applications that allow you to create a slideshow from a collection of images. Google Picasa is one that I have used in the past. However, it is limited on capabilities for titles, transitions and slideshow speed control.

The finished product from my efforts is presented below. The process was simple enough (and rather fun) that I have a number of new ideas for other time-lapse, screen capture projects. I hope that this short tutorial provides you with some helpful information so that you can create your own time-lapse video. Good luck with your project!

Wednesday, July 14, 2010

Ford Escape Hybrid Brake Failure - Revisited

In a previous blog post, we discussed our unfortunate and frustrating experience with the brake failure on our 2005 Ford Escape Hybrid ("FEH"). More specifically, the failure of the regenerative braking system due to a defective master cylinder and hydraulic control unit ("HCU"). Since posting that information, we have heard from many other Ford Escape and Mercury Mariner Hybrid owners who have experienced the same problem. Most all of them described the harrowing experience of having the electro-hydraulic brakes resort to failsafe mode; some resulting in accidents or near-misses.

I am happy to report that after replacing the defective master cylinder and HCU at a cost of more than $7,000, the regenerative brakes on my FEH have worked without incident for more than six months. No more warning lamps, alarms, or death-defying stops using the hand-controlled emergency parking brake. 

As fully described in my related post, Ford was unresponsive to this matter. In fact, the service managers at three different dealerships either refused to acknowledge this was an issue with the FEH, or failed to bring the problem to my attention, even though Ford had recognized that this was a problem only a few months after I purchased the vehicle. We had previously encouraged anyone else having this problem to file a complaint with the Office of Defects Investigation ("ODI") at the National Highway Traffic Safety Administration ("NHTSA"). If you have not already done so, you can file a safety complaint at this web site... http://www-odi.nhtsa.dot.gov/ivoq/ or by calling the NHTSA Safety Hotline, Monday through Friday from 8:00 a.m. to 8:00 p.m. at (888) 327-4236, TTY: (800) 424-9153.

A number of complaints have already been filed. I have reproduced some of those below to help give you an idea of how similar the problems are amongst those who have experienced this brake failure.

ODI Case Number: 10181021
Component: SERVICE BRAKES, HYDRAULIC:ANTILOCK:ABS WARNING LIGHT
Details: COMPLETE BRAKE FAILURE. FIRST TIME IT OCCURRED WAS ON THE INTERSTATE - 65 MILES AN HOUR AND THE BRAKE LIGHT AND THE ABS LIGHT CAME ON AND THERE WAS A BEEP. THERE WERE THEN NO BRAKES AT ALL. LUCKILY, I WAS ABLE TO GET TO THE SIDE OF THE ROAD AND COAST TO A STOP. TURNED OFF THE TRUCK AND STARTED IT AGAIN AND IT HAD BRAKES. ON THIS LAST INCIDENT, THE SAME THING IN THE SAME ORDER HAPPENED. THANKFULLY, MY WIFE WAS ABLE TO GET THE VEHICLE TO COAST TO A STOP WITHOUT HITTING ANYONE OR ANYTHING. THIS PROBLEM IS VERY DANGEROUS. IT IS INTERMITTENT THUS MAKING IT HARD TO DIAGNOSE. *JB
Occurrences: 2Injuries: 0
Fail Date: 01/27/2007Deaths: 0
Date added to datbase: 1/29/2007 

ODI Case Number: 10204195
Component: SERVICE BRAKES, HYDRAULIC
Details: THE BRAKES HAVE COMPLETELY STOPPED WORKING (EXCEPT FOR THE EMERGENCY BRAKE) 3 TIMES IN ONE MONTH, 4 TIMES IN TWO YEARS. *TR
Occurrences: 4Injuries: 0
Fail Date: 08/26/2007Deaths: 0
Date added to datbase: 9/26/2007 

ODI Case Number: 10221386
Component: SERVICE BRAKES, HYDRAULIC:SWITCHES:BRAKE LIGHT
Details: SERVICE BRAKE SYS MESSAGE ON 2005 FORD ESCAPE HYBRID ALONG WITH BRAKE WARNING LIGHT. *TR
Occurrences: 1Injuries: 0
Fail Date: 03/15/2008Deaths: 0
Date added to datbase: 3/16/2008 

ODI Case Number: 10234772
Component: SERVICE BRAKES, HYDRAULIC
Details: HAVE HAD THE "SERVICE BRAKE SYSTEM" MESSAGE AND THE DASH "BRAKE" INDICATOR LIGHT GO ON RANDOMLY WITHOUT BRAKING FOR A COUPLE OF MONTHS (BEGAN IN MAY 2008) IT HAS BEEN TO THE DEALER TWICE (IN JUNE 2008) AND IS NOW DOING IT AGAIN. THE DEALER REPLACED AN ELECTRICAL HARNESS THIS FIRST TIME AND CLEANED CONTACTS ACCORDING TO A FORD SERVICE ALERT THE SECOND. I ALSO HAD A SIMILAR PROBLEM IN THE FALL OF 2007. THE "SERVICE BRAKE SYSTEM MESSAGE" APPEARED AND THE DASH "BRAKE" INDICATOR LIGHT CAME ON OVER A THREE WEEK PERIOD FOLLOWED BY THE 4X4 SYSTEM AND ABS SYSTEM MAKING NOISE, JERKING THE CAR SEVERAL TIMES AND THEN SHUTTING DOWN WHILE I WAS DRIVING (NOVEMBER 2007). THIS WAS FIXED BY THE DEALER BUT NOW THE CARS INDICATOR LIGHTS ARE TURNING ON AGAIN AND THE PROBLEM DOES NOT SEEM TO ABLE TO FIXED. I AM WORRIED THE BRAKE SYSTEM WILL FAIL AGAIN. *TR
Occurrences: 1Injuries: 0
Fail Date: 07/18/2008Deaths: 0
Date added to datbase: 7/18/2008 

ODI Case Number: 10276404
Component: SERVICE BRAKES, HYDRAULIC
Details: BRAKE SYSTEM FAILURE ON 2005 FORD ESCAPE HYBRID: HIGHWAY DRIVING, NO BRAKING DURING FAILURE - ABS LIGHT COMES ON WITH "SERVICE BRAKE SYSTEM" MESSAGE ON CONSOLE. TOOK TO DEALER WHERE THEY "DIAGNOSED" MASTER CYLINDER FAILURE. REPLACED MASTER CYLINDER. 06 JULY 09 BRAKE SYSTEM FAILURE ON 2005 FORD ESCAPE HYBRID: NORMAL CITY DRIVING UNDER 35MPH ABS LIGHT COMES ON WITH "SERVICE BRAKE SYSTEM" MESSAGE ON CONSOLE. *TR
Occurrences: 1Injuries: 0
Fail Date: 06/26/2009Deaths: 0
Date added to datbase: 7/11/2009 

ODI Case Number: 10306490
Component: SERVICE BRAKES, ELECTRIC
Details: MY 2005 FORD ESCAPE HYBRID HAVE 140,000 MILES ON IT FOR THE PAST 3 WEEKS THE ABS LIGHT AND THE RED TRIANGLE STOP THE CAR SAFELY COME ON WHEN I START THE CAT. I PULL OVER SHUT THE CAR OFF RESTART AND ALL IS WELL UNTIL THE NEXT TIME. *TR
Occurrences: 1Injuries: 0
Fail Date: 01/25/2010Deaths: 0
Date added to datbase: 2/5/2010 

ODI Case Number: 10308285
Component: SERVICE BRAKES, HYDRAULIC
Details: FORD HYBRID ESCAPE BRAKE LIGHT KEEPS COMING ON. I HAVE TO TURN IT OFF AND THEN BACK ON TO GET THE LIGHT OUT. DEALER SAYS ITS A GROUND FAULT AND FORD HAS A NEW WIRING HARNESS, BUT I AM REQUIRED TO PAY FOR IT, ITS AN 05 WITH LESS THAN 8,000 MILES ON IT, YET I AM TO PAY AND FIX FORDS PROBLEM, AND WE ARE TALKING BRAKES HERE, THAT FORD KNOWS ABOUT AND HAS ALREADY IDENTIFIED AND HAS A FIX FOR. IT NEEDS A RECALL. THE ELECTRIC STEERING HAS ALREADY FAILED ONCE AND HAD TO HAVE A NEW COMPUTER FOR THIS. FORD IS HIDING PROBLEMS WITH THE CAR. *TR
Occurrences: 1Injuries: 0
Fail Date: 02/01/2010Deaths: 0
Date added to datbase: 2/10/2010 

ODI Case Number: 10314433
Component: SERVICE BRAKES, HYDRAULIC
Details: WE HAVE EXPERIENCED AN UNUSUAL PROBLEM WITH THE BRAKING SYSTEM IN OUT 2005 FORD ESCAPE HYBRID. THERE HAVE BEEN MAY EPISODES OF THE YELLOW ABS AND THE RED BRAKE WARNING LAMP LIGHTING UP AND THE ALARM SOUNDING OVER THE PAST YEAR. THIS WOULD HAPPEN FOR A COUPLE OF DAYS AND THEN AFTER SHUTTING-OFF THE VEHICLE AND RESTARTING, THE BRAKES RETURNED TO NORMAL OPERATION. WE SPOKE WITH THE SERVICE DEPARTMENT AT OUR DEALERSHIP ABOUT THIS AND BECAUSE THE WARNING LIGHT WASNT ON AT THE TIME, THEY SAID THERE WAS NOTHING THEY COULD DO TO DETECT THE PROBLEM. THE LAST TIME THIS HAPPENED THE BRAKES REVERTED TO FAIL SAFE MODE REQUIRING A "PEDAL TO THE FLOOR" EFFORT TO SLOW THE VEHICLE TO A SAFE STOP LUCKILY WHILE PULLING INTO OUR DRIVEWAY . AFTER THIS WE HAD THE CAR TOWED TO THE DEALER AND WERE TOLD WE NEEDED A NEW "HCU" UNIT AND MASTER CYLINDER WITH A TOTAL REPAIR COST OF $4K+. I DECIDED TO DO SOME RESEARCH AND DISCOVERED MANY CASES OF THE EXACT SAME THING HAPPENING WITH THE SAME YEAR AND MODEL ESCAPE. WE ARE GOING TO WAIT A FEW DAYS TO THINK BEFORE MOVING FORWARD WITH THE REPAIR. *TR
Occurrences: 1Injuries: 0
Fail Date: 02/24/2010Deaths: 0
Date added to datbase: 2/25/2010 

ODI Case Number: 10324854
Component: SERVICE BRAKES, ELECTRIC
Details: 2005 FORD ESCAPE HYBRID CAR HAS 65,000 MILES ON IT WITH NO HISTORY OF BRAKE TROUBLE. COMING DOWNILL THE ABS/BRAKE LIGHTS CAME ON ALONG WITH AN ALARM AND IMMEDIATE LOSS OF THE BRAKES. HAD TO USE MECHANICAL EMERGENCY BRAKES TO STOP. CALLED DEALERSHIP NEXT MORNING TO TOW IT IN, THEN READ ON LINE TO TRY RESTARTING THE CAR THE NEXT DAY AND THE PROBLEM MIGHT BE GONE. CAR STARTED, NO BRAKE ISSUES APPARENT (NO LIGHTS, BRAKES FUNCTIONAL) SO DROVE IT TO DEALERSHIP FOR REVIEW/REPAIR. TOOK COPIES OF ONLINE RESEARCH SHOWING THIS IS AN ISSUE WITH THE CAR. DEALERSHIP CLAIMED IT WAS THE REAR AIR CONDITIONER (HOLE IN THE EVAPORATOR CORE) - THEY HAD REPAIRED THE AC 4 MONTHS PREVIOUSLY, WHICH ONLY LASTED FOR 6 WEEKS. PLANNED TO HAVE THEM REPAIR IT AT THE 65,000 MILE SERVICE ANYWAY. PAID $1033. DROVE CAR HOME THAT NIGHT AND THE ABS/BRAKE LIGHTS WENT ON, ALARM SOUNDED BUT THIS TIME NOT A TOTAL LOSS OF BRAKES. INSTEAD WHENEVER PRESSURE IS APPLIED TO THE BRAKE PEDAL, THERE IS A LOUD THUMPING NOISE FROM THE FRONT BRAKES AND SHUDDERING THROUGHOUT THE CAR. PLAN IS TO RETURN TO DEALERSHIP AFTER THE WEEKEND AND BRING LATEST RESEARCH SHOWING FAULTY HCU UNITS HAVE BEEN FOUND TO BE AN UNDERLYING CAUSE, WHICH FORD IS DENYING. *TR
Occurrences: 1Injuries: 0
Fail Date: 03/31/2010Deaths: 0
Date added to datbase: 4/10/2010 

It would appear as though all of these cases are related to the problem as described in Ford's Technical Service Bulletin TSB 0585 (issued August 5, 2005), which states:

ABS AND BRAKE WARNING LAMP ON WITH DTC C1526 - DTC C1524 MAY ALSO BE PRESENT VEHICLES BUILT PRIOR TO 2/11/2005

ISSUE: Some 2005 Escape Hybrid vehicles built prior to 2/11/2005, may exhibit the yellow ABS and the red brake warning lamps illuminating after the engine is started, and an increase in brake pedal effort. Diagnostic trouble code (DTC) C1526 (Brake Pedal Travel Sensor) will be present in the ABS module, C1524 (Brake Pedal Travel Sensor Calibration Incomplete) may also be present.

ACTION: Install a revised master cylinder. Refer to Workshop Manual Section 206-06.

PART NUMBER PART NAME: 5M6Z-2140-B Master Cylinder

My experience, and that of others, has been that the resolution also includes the replacement of the defective HCU. At this point, the repair of the poorly designed brake system is the sole responsibility of the vehicle owner. I believe that the only way Ford will address this important safety matter is if the NHTSA will take notice. If you have had a problem with the regenerative braking system on your Ford Escape or Mecury Mariner Hybrid, please consider notifying the NHTSA. By contacting the NHTSA, you may help bring this important safety matter to the attention of other owners of these vehicles.