Using AppleScript to Launch a Bunch of Startup Applications

using applescript to auto launch mac apps

 

For the six years I’ve been using a Mac, I’ve often wanted to learn how to use AppleScript to automate processes I repeat. Today I finally did.

As part of my routine for keeping my Mac running efficiently, I like to re-boot it every couple of days. And to make sure it continues to boot quickly, I’ve made sure I’ve deleted everything that wants to auto-startup at boot. That way, I get a nice, clean, quick boot if I need it.

However, there are also a number of sites and apps that I use all day that I need to run. So instead of opening them all up individually after a new boot, I’ve written an AppleScript to do it for me.

Now if you’re an old AppleScript hand, this is probably stupidly simple. But I know lots of friends and family who have moved to a Mac in recent years and who aren’t programmers, so this is for them.

The Steps.

1. Open AppleScript. It comes pre-installed on your Mac. Find it by searching Spotlight.

2. Start a new script.

3. Cut & Paste my code from below. Change the URLs you want to open and the App you want to run according to your tastes.

4. Click “Compile” on the AppleScript toolbar.

5. Flie > Save. Save it to your Applications folder. Make sure the “File Format” is “Application”. Call it whatever you want – mine is just called ‘Startup’.

6. Lastly, open up the Applications folder and drage the icon for the new app to your dock. Close AppleScript.

Now, when you boot, after the dock loads, just run the new app and it will open all of your sites and apps for you.

 

 

 

open location “http://gmail.com”

open location “http://facebook.com”

 

tell application “TextExpander”

activate

end tell

 

tell application “Alfred 2”

activate

end tell

 

tell application “CrashPlan”

activate

end tell

 

tell application “PopClip”

activate

end tell

 

tell application “Bartender”

activate

end tell

 

tell application “Fantastical”

activate

end tell

 

tell application “Moom”

activate

end tell

 

tell application “Skype”

activate

end tell

 

tell application “TweetDeck”

activate

end tell

 

tell application “Evernote”

activate

end tell

 

tell application “Spotify”

activate

end tell

Macbook Disaster!!!! Need A New Mac!

Tech disasters are like being attacked by a Great White – you never see the danger coming until it’s too late.

Yesterday morning I shut the lid on my two-year old Macbook Pro 17″ to take a shower. Fifteen minutes later, when I opened up the screen again, nothing happened. I tried re-booting it, taking the battery out, etc, but it still wouldn’t boot.

So I dropped it into the Apple Store at Chermside. They called me today to inform me that the logic board is dead and that it will cost $2100 to replace it. An entirely new Macbook Pro only costs about $3500.

Luckily everything was backed up, but my only other machine is a 3 year-old Vista desktop, so it’s not compatible, even in this day of “cloud computing”. Chrissy is also letting me borrow her baby Macbook for urgent Mac-related stuff. But I really need to replace my Macbook Pro asap.

So I’m in the market for a new Macbook. My last one was kindly sponsored by a Canadian company in return for advertising for a year on this podcast. I’m hoping to find someone else willing to do a similar deal. If you’re interested, please email me.

How Twitter Saved Me $2000

A lesson in the power of having a network for those people who still snort when you mention Twitter (who are, I’m sure, the same people who still snort when you mention climate change).

About a year ago, I dropped my Macbook Pro – twice. Both times I was traveling and the shoulder bag I had it in slipped off of my shoulder while I was wheeling several suitcases around France. The result of the drops was pretty severe damage to the case of the Macbook. It still worked fine, it was just dinged up pretty badly. Until recently. A few weeks ago, I stopped being able to shut the case properly and then the piece of plastic that holds the screen in the lid cracked and broke.

I knew it was time for a new Macbook case.

So, I emailed photos to a couple of local Macbook repair places.

The folks at Next Byte were completely useless. All they could tell me was “you’ll have to bring it in for us to look at it”. If I had time to bring it in, I wouldnt have bothered sending photos, you useless morons.

The folks at The Mac Doctors in Annerley, were, as always, very polite, friendly and helpful. They emailed me back a quote – $2500 – and explained why it would cost so much (the screen comes with the case, no way around it) and suggested I’d probably be better off buying a new Macbook.

Instead, I posted a question on Twitter: “Does anyone have a dead Macbook Pro 17″ they’d be willing to sell me?”

Within an hour I had three “yes” replies. Adrian Lynch was the first and after a quick phone call, we’d negotiated a deal. I put the money in his account and had a courier pick up his dead machine (he’d drown his keyboard in wine).

Yesterday, when his dead unit turned up at my place, I took it into The Mac Doctors and today I picked up my perfectly good Macbook Pro – my drive and motherboard stuffed into Adrian’s old case and screen.

Total cost, including his unit, the courier and the hatchet job?

A little less than $500.

The power of Twitter.