Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Open Dashboard at login with AppleScript System 10.4
Tiger only hintIf you're like me, the biggest thing that bothers you about Dashboard is how slowly the widgets load the first time you activate it. My typical routine is to start up my computer and walk away while it boots up. I thought this would be the perfect time to activate Dashboard and let it fully load while I'm away.

I used this AppleScript:
tell application "Dashboard"
  launch
end tell
I simply saved this script as an applet, and added it to my login items. 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 to my desk. Can anyone out there help with this?
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[14,920 views]  

10.4: Open Dashboard at login with AppleScript | 11 comments | Create New Account
Click here to return to the '10.4: Open Dashboard at login with AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Open Dashboard at login with AppleScript
Authored by: friedguy on Aug 16, '05 10:31:30AM

I don't think it is really necessary to leave it open for 30 seconds. You can just have it open then close right away, which will load the widgets. I believe someone made another small app to do this very same thing and was mentioned in an earlier hint.



[ Reply to This | # ]
10.4: Open Dashboard at login with AppleScript
Authored by: mipod on Aug 16, '05 10:32:10AM
Why do you shut down your Mac in the first place? Take a look at DashboardStarter, it'll launch and close Dashboard (quickly) and preload your widgets.

[ Reply to This | # ]
10.4: Open Dashboard at login with AppleScript
Authored by: pepi on Aug 16, '05 07:33:14PM

I have to admit that I didn't try this yet (don't wanna logout now), but why not just put the /Applications/Dashboard.app into your startup items? I guess this would launch Dashboard to preload your gazillion of widgets. Won't deactivate it again for sure.



[ Reply to This | # ]
10.4: Open Dashboard at login with AppleScript
Authored by: pepi on Aug 16, '05 07:37:19PM

Ok, ok, Fast User Switching to the rescue. Works as expected. Activates Dashboard and loads your Widgets, Dashboard stays active. :-)

Regards Pepi (where is that [Edit] button for my own comments?)



[ Reply to This | # ]
10.4: Open Dashboard at login with AppleScript
Authored by: mici on Aug 17, '05 05:02:08AM

this was the first thing i tried: Dashboard will briefly appear upon login (zooms in/out) but, strangely, the widgets won't load.



[ Reply to This | # ]
10.4: Open Dashboard at login with AppleScript
Authored by: mici on Aug 17, '05 04:54:38PM

to make myself clear, neither Dashboard in Launch Items nor DashboardStatrer did the trick for me. only dayglow's above hint to script the GUI helped (thx!).



[ Reply to This | # ]
10.4: Open Dashboard at login with AppleScript
Authored by: dayglow on Aug 16, '05 06:37:17PM

Hi, assuming you're using function keys to trigger Dashboard you could use the following:

tell application "System Events"
key code 105
delay 1
key code 105
end tell

This is for F13; replace 105 with one of the following depending on your set-up.

F1 122
F2 120
F3 99
F4 118
F5 96
F6 97
F7 98
F8 100
F9 101
F10 109
F11 103
F12 111
F13 105
F14 107
F15 113



[ Reply to This | # ]
10.4: Open Dashboard at login with AppleScript
Authored by: leisuremonkey on Aug 17, '05 03:38:45PM

Very nice! this is exactly what I was looking for. Thanks.

I had actually started using DashboardStarter, but it's nice to have options.



[ Reply to This | # ]
10.4: Open Dashboard at login with AppleScript
Authored by: cougar718 on Aug 18, '05 05:22:29PM
Hello all,

I wrote an application to accomplish what this hint set out to do. The only thing this application will do differently is take a lot less CPU and won't show the spinning cursor.

Just copy the below code into a new script. Save the script as an application and make sure 'Stay Open' is checked off. Then configure the 2 properties in order to customize it to your environment.

Good luck!


-- Funct=ion Key Values
(*
F1  - 122 
F2  - 120 
F3  - 99 
F4  - 118 
F5  - 96 
F6  - 97 
F7  - 98 
F8  - 100 
F9  - 101 
F10 - 109 
F11 - 103 
F12 - 111 
F13 - 105 
F14 - 107 
F15 - 113
*)

-- Configure how long do we wait until Dashboard is closed/deactivated
property intWaitDelay : 10 -- Seconds
-- Configure which key we press for Dashboard to be triggered.
property intFunctionKeyValue : 118 -- F4

-- Application's properties
property dateGoal : ""

on run
	tell application "System Events" to key code 118
	-- Add our Wait Delay to the current date
	set dateGoal to (current date) + intWaitDelay
end run

on idle
	if ((current date) is greater than or equal to dateGoal) then
		tell application "System Events" to key code 118
		quit -- Exit
	end if
	return 1
end idle

---
Rick alias cougar

[ Reply to This | # ]

10.4: Open Dashboard at login with AppleScript
Authored by: jdalbec on Sep 12, '08 08:27:10PM

ignoring application responses
tell application id "com.apple.dashboardlauncher" to launch
tell application id "com.apple.exposelauncher" to launch
tell application id "com.apple.exposelauncher" to launch
end ignoring



[ Reply to This | # ]
10.4: Open Dashboard at login with AppleScript
Authored by: jdalbec on Sep 12, '08 09:07:34PM

This works too (at least in 10.5 using Automator's "Run Applescript" action):

ignoring application responses
tell application "Dashboard"
launch
end tell
tell application "Expose"
launch
launch
end tell
end ignoring



[ Reply to This | # ]