I’m a big fan of Apple’s Dashboard. But, the one thing that bothers me, is how slow it is to launch the first time you activate it, especially if you have multiple widgets that connect to the internet. I started to think of a way to minimize this delay in my workflow.
I work from home, and I have a fairly predictable routine in the morning. I get up, start my computer, and go downstairs for a smoke and what-not. So, the solution I came up with is to have Dashboard activated for the first time automatically, at login, while I’m away from my computer. I used AppleScript to accomplish this.
I’m no AppleScript expert, but this was pretty easy to do because AppleScript is often just like simple English. First, I wrote this script in Apple’s Script Editor application (located in your Applications folder):
tell application "Dashboard"
Then, just save this script as an Application, or Applet as they are sometimes called. Now all you have to do is add the Applet to you login items. The next time you start your computer, Dashboard will be activated automatically.
Now, here’s where I could use a little help from a real AppleScripter. My original intention was to have the script activate Dashboard, wait 30 seconds and then deactivate it. As it is now, Dashboard is still active when I return from my smoke. Can anyone out there help with this?
UPDATE (8.11.05): odl reader, Luis, was kind enough to turn me on to DashboardStarter, written by Stefan SchÃ¼ÃŸler. This great little app does exactly what I was trying to do with AppleScript. Way to go Stefan. Thanks for the heads up Luis.
tell application "System Events"
key code 105
key code 105
This is for F13; replace 105 with one of the following depending on your set-up.
2 thoughts on “Open Dashboard at login with AppleScript”
Yesterday I entered in your website and read this article (a question I have too). Today I see in VersionTracker the answer. Coincidence?
DashboardStarter is a small application that brings up Dashboard and closes it right away. Drag the app to your login items and have Dashboard load the widgets in the background.
Very cool, Luis! Thanks! This is exactly what I needed. Nice find.