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


Click here to return to the '10.3: Display the clock in a window and in the menu bar' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Display the clock in a window and in the menu bar
Authored by: chally on Apr 16, '04 02:36:46PM
Well, they didn't feel like putting this up as a hint, so I'll paste it in here. I don't understand why they publish worthless "hints" that are plainly obvious OS features but they won't publish useful scripts and techniques when they're provided, so here it is as a reply to an earlier related and useful hint. Apple really screwed up the clock application in OS X v10.3 Panther by making it no longer a real application so you can't easily hide the clock window or configure the clock. I got tired of screwing with the System Preferences to show and hide the clock when I want to watch a movie, so I wrote this simple script to toggle the viewable state of the clock. Hope you find it as useful as I have:
-- Toggle Clock.scpt

tell application "Finder" to set theCount to ¬
	the count of (processes whose name is "WindowClock")

if theCount > 0 then
	tell application "WindowClock" to quit
else
	tell application "WindowClock" to run
end if


[ Reply to This | # ]
10.3: Display the clock in a window and in the menu bar
Authored by: chally on Apr 19, '04 03:01:21PM
Okay...this has now been published as a hint after all [sheepish grin]. However, a poster pointed out over there that the Finder is no longer the best app to ask about processes, but rather System Events. The script should probably now read:
-- Toggle Clock.scpt

tell application "System Events" to set theCount to ¬
	the count of (processes whose name is "WindowClock")

if theCount > 0 then
	tell application "WindowClock" to quit
else
	tell application "WindowClock" to run
end if


[ Reply to This | # ]