|
|
Pseudo "DashBoard feature" with AppleScript and Butler
|
|
|
|
Junior Member
Join Date: Mar 2004
Location: Marseille, France
Status:
Offline
|
|
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.
)
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Jul 2001
Status:
Offline
|
|
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 ...
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Mar 2004
Location: Marseille, France
Status:
Offline
|
|
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
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Dec 2003
Status:
Offline
|
|
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.
)
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Dec 2003
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Mar 2004
Location: Marseille, France
Status:
Offline
|
|
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 Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|