Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > GUI Customization > Pseudo "DashBoard feature" with AppleScript and Butler

Pseudo "DashBoard feature" with AppleScript and Butler
Thread Tools
AveTenebrae
Junior Member
Join Date: Mar 2004
Location: Marseille, France
Status: Offline
Reply With Quote
Nov 10, 2004, 07:09 PM
 
Hi,
not sure this is the right forum but..
i have googled a while searching that and never finded it so, tried to do it myself.

First, collect some applications that have a "Foreground" feature, like :
Stickies
X Ressources Graph
Calendar
You can had a background with Screenshot Helper

Do an Applescript like that :
I use Stickies visibility to see if the dashboard is active but u could use any other app of course
tell application "System Events"
if exists application process "Stickies" then
if visible of application process "Stickies" then
set visible of application process "Stickies" to false
set visible of application process "Calendar" to false
set visible of application process "X Resource Graph" to false
set visible of application process "Screenshot Helper" to false
else
set visible of application process "Stickies" to true
set visible of application process "Calendar" to true
set visible of application process "X Resource Graph" to true
set visible of application process "Screenshot Helper" to true
set frontmost of application process "Screenshot Helper" to true
end if
end if
end tell
In end, just assign a shortcut to this applescript with Butler (for me it's F12) and you got it

Personnally i don't use Screenshot helper (i like the way calendar, stickies and XRG can be translucend) but this was for exemple (you can add this way iTunes or Calculator).

Any idea that could improve it are welcome of course !
( Last edited by AveTenebrae; Nov 11, 2004 at 12:21 AM. )
     
loren s
Senior User
Join Date: Jul 2001
Status: Offline
Reply With Quote
Nov 10, 2004, 11:39 PM
 
cute. It is funny how It takes a company sometimes to make an idea that everyone tries to mock or copy only after it is brought to light. And that goes in reverse to ...
     
AveTenebrae  (op)
Junior Member
Join Date: Mar 2004
Location: Marseille, France
Status: Offline
Reply With Quote
Nov 11, 2004, 12:26 AM
 
hey, i don't do it for glory or something else
i just put here a simple and useful way (for me) to have stickies, calendar or other useful stuff always close but without clutturing my lil' desktop
ok, use of "dashboard" word is perhaps too much but it explain pretty well the concept
     
wibs
Mac Enthusiast
Join Date: Dec 2003
Status: Offline
Reply With Quote
Nov 11, 2004, 01:31 AM
 
been tinkering, so the whole post is new now instead of just an addition at the end...

First off, great idea. I'm an AppleScript novice on a good day, but here are some modifications I've made:

Code:
tell application "System Events" if exists application process "Stickies" then if visible of application process "Stickies" then set visible of application process "Screenshot Helper" to false set visible of application process "Stickies" to false set visible of application process "iCal" to false set visible of application process "Calculator" to false else set visible of application process "Screenshot Helper" to true set visible of application process "Stickies" to true set visible of application process "iCal" to true set visible of application process "Calculator" to true set frontmost of application process "Screenshot Helper" to true set frontmost of application process "Adium" to true set frontmost of application process "Calculator" to true set frontmost of application process "iCal" to true set frontmost of application process "Stickies" to true end if else tell application "Stickies" activate end tell end if end tell
The big differences are that if Stickies isn't running this script launches it, the "dashboard" apps are cycled through in a specific order to make sure that Screenshot Helper doesn't cover any of them by accident, and Adium never goes away.

The big issue for me now is reclaiming some dock space. I tried setting the LSUIElement = 1 for some of the apps, but then they were background processes instead of application processes and I'm not sure if "visible" and "frontmost" are even terms that apply to background processes. I didn't find a way to control them, at least.

Also, it would be nice if this script could go back to the beginning if it needed to launch Stickies so that I wouldn't need to run it twice (once to launch stickies and a second time to actually do the dashboardy goodness), but I'm at the limit of what little applescript (in)competence I have. Big thanks to anyone who can improve this script a bit, and to AveTenebrae for doing it in the first place.
( Last edited by wibs; Nov 11, 2004 at 02:18 AM. )
DigitalRamen sucks.
     
wibs
Mac Enthusiast
Join Date: Dec 2003
Status: Offline
Reply With Quote
Nov 11, 2004, 03:57 AM
 
screw it. I remembered that I had VirtualDesktop (haven't had it installed for forever because of how much I like expose), and now I've got that set up with dashboard-esque things on one desktop and everything else on another, with a mouse button switching between the two. no complaints with this method other than it's not as pretty as the real dashboard or desktop manager, but it lets me assign apps to the right desktop and is a heck of a lot faster than an applescript. I still think the upgrade to version 3 was a ripoff, though.
DigitalRamen sucks.
     
AveTenebrae  (op)
Junior Member
Join Date: Mar 2004
Location: Marseille, France
Status: Offline
Reply With Quote
Nov 11, 2004, 09:17 AM
 
hey, you are right, is a simple and better way to add this feature
i have tryed this one, but my little menubar was cluttured with butler, iscrobbler and some apple ones, but the pager is the good choice, especially with hotkeys
so...forget my thread
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:47 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,