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

Toggle DesktopCalendar's on top status via script Apps
DesktopCalendar was a Pick of the Week some time ago (it's in the Hall of Fame section now). I went ahead and downloaded it because it shows you the full date on your desktop at a glance. For about five or six months, I've always kept the calendar on top and let it float over my other applications. It didn't bother me at first until I started to use the full screen for editing pictures and movies. I figure that I don't always need to have it on top while editing pictures, movies, etc. So I created the following script that will toggle the "always on top" checkbox in the preference pane of the application.

So while I am editing pictures, movies, etc, I will move the calendar to the background. For normal routine work, I will toggle it so it is always on top. After it toggles the checkbox "always on top," the preference window will close.

The following is just a small snippet of what you can do with GUI scripting. Make sure that you have Enable access for assistive devices checked in the Universal Access preferences panel. You can copy and paste the script into your Script Editor and save it as an application and put it in your script library for when you need it. This was created on Panther.
tell application "DesktopCalendar" to activate
tell application "System Events"
  tell application process "DesktopCalendar"
    -- This is clicking the preference button
    -- command + k in the menu bar
    key down command
    delay 1
    keystroke "k"
    delay 1
    key up command
    delay 1
    -- This clicks on the list in the Desktop preferences
    click button "Global" of list 1 of scroll area 1 ¬
     of window "DesktopCalendar Preferences"
    delay 1
    -- This toggles the Always on top button
    click checkbox "Always on top." ¬
     of window "DesktopCalendar Preferences"
    delay 1
    keystroke return -- This closes the preference window
  end tell
end tell
[robg adds: This worked fine for me, using the latest DesktopCalendar version -- however, it only works for the "standard" version, not the "status bar" version.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[3,145 views]  

Toggle DesktopCalendar's on top status via script | 0 comments | Create New Account
Click here to return to the 'Toggle DesktopCalendar's on top status via script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.