How to detect page loading status using applescript and chrome

This is far from rocket science but I haven’t seen it posted so I’m going to put it here for posterity. This is how you can detect if a page is loaded in chrome with applescript. This is a subroutine, so you can put it at the end of your program and call it with this line

checkForLoading()

Ok, here’s the subroutine.

on checkForLoading()
# checks chrome to see if the frontmost tab is loaded
tell application "Google Chrome" to set chromeLoading to loading of active tab of window 1
repeat while chromeLoading = true
delay 1
tell application "Google Chrome" to set chromeLoading to loading of active tab of window 1
end repeat
end checkForLoading

If I recall correctly, wordpress messes up quotes. If this doesn’t compile then replace the quotes and try again.

star trail stacking in photoshop

flattenedFullframe

I have always wanted to do this kind of photography, but with most digital cameras there is simply no way you can leave the shutter open and the sensor on for a few hours. My D40 starts to get some serious noise after a few minutes, and there clearly must be an upper limit due to the sensor overheating. Luckily for me there is a relatively simple way to compose LOTS of shots into one image and achieve the same effect.
For those who only want to mile high review of it, here it is. Take a ton of pictures with a long-ish shutter speed. (for this one I used 10 seconds) and then layer them all in photoshop on top of each other and use the
“screen” blending mode to get them all visible.
The actual application of this can be difficult, because it is either REALLY time consuming, or it requires some thought and scripting. I decided to go for the latter and use my noggin a bit.

Scripting a photoshop action.
Continue reading

Increase the frequency that Gmail checks your POP mail account

Update! After reading the theory on this page you should go to this page to find a simpler, better solution.

Picture 16

Ok this hack might not be for everyone, but if you have Gmail set up to check your pop accounts they don’t let you set the polling frequency anywhere. This can be bad because it makes you go to the settings page to be able to hit the refresh button on each one of your accounts! After a little digging it turns out it uses a weird formula to determine the polling frequency. Let’s say it checks your account and finds an email. The next time it checks it will wait for _slightly less time_ before it checks again. If it finds email a second time it will continue to shorten the interval until it is checking every 5 minutes or so (maybe even less!) The purpose of this is so that google doesn’t waste resources checking an account that only gets one email a month.

The downside of this approach is that if you are eagerly waiting for that one email you might be waiting for a long time (i have seen wait times up to 58 minutes!)

The answer is very simple once you know how it works – get more email! I didn’t want to test to see if the spam filter counts spam received as real mail. I doubt that it does. So I did the next best thing – I automated sending myself email!

I have thought of two different ways of doing this both are mac only, but there must be a billion ways to skin this cat!

Continue reading

“Arduino Powered” CD Changing Robot

UPDATE!

Check out my new(er) cd robot project here. I grabbed an old scsi changer machine from ebay and have been working on adding serial connectivity to it. If it works, it will be a much simpler route!

One of my “always in my head” projects is a CD changing machine. I have seen the myriad of other projects out there, and this always captivates me, in that it is just out of reach, but it seems to be a fairly simple concept. I have been thinking and sketching on this one for SUCH a long time that I have decided to post it before it is fully polished up.

arduino powered cd robot - left side

The basic premise is I have an arm that swings up and down mounted on a platform that rotates 180 degrees. Both of those are positioned by hobby servos. On the tip of the arm there is two vacuum aided suction cups and some hdpe tubing.

arduino powered cd robot - front view facing right

Continue reading

I’m waiting for a package like a snake in the grass.

And by that I mean I’m stalking fedex.

I’m currently waiting for my Ardino starter pack to arrive from Adafruit Industries and I’m getting a bit impatient. I decided to automate the psychotic task of manually reloading the tracking page every ten minutes.

I’m sure there are web sites out there to keep you updated of your packages progress across the world. I couldn’t find any and decided to put together my own FedEx stalking kit. This is only for Mac, but you needed a reason to switch, didn’t you?

Ok, this is admittedly not the best way to do this, but it works. Here we go…

Step 1 – applescript
Write an applescript telling firefox to open the fedex tracking link. Save it to somewhere you can remember
fedex stalking

Step 2 – iCal Continue reading