 |
 |
How do I make an Applescript for "Show Desktop" function?
|
 |
|
 |
|
Junior Member
Join Date: May 2001
Status:
Offline
|
|
Hi,
One aspect of Windows I like (I know this is a Mac forum, please don't flame me  ) is the "Show Desktop" button in the taskbar, which hides all apps and returns you to the desktop. I know very little about Applescript, but I'm sure it would be possible to make a script that would do this.
Does anyone have any tips about how to do this, or any websites for Applescript info that might have the commands I need? Thanks a lot!
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Feb 2001
Status:
Offline
|
|
Here:
tell application "Finder"
set visible of every process to false
activate
end tell
If that doesn't work, try this:
tell application "Finder"
try
set visible of every process to false
end try
activate
end tell
(146)
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Apr 2002
Location: Chicago
Status:
Offline
|
|
If you're original intent was to find out how to script that command, ignore this message.
Without scripting, all you have to do is this:
1. Select the Finder from the Application menu (make it the active application)
2. Once again, from the Application menu, select Hide Others.
|
|
|
| |
|
|
|
 |
|
 |
|
Moderator 
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Online
|
|
Originally posted by AppleScript:
<STRONG>Here:
tell application "Finder"
set visible of every process to false
activate
end tell
If that doesn't work, try this:
tell application "Finder"
try
set visible of every process to false
end try
activate
end tell
(146)</STRONG>
That's not what the Wintel feature does, that one also hides all Finder windows. I suppose you could do something like
set minimized of front window to true
and have it go through all the windows. To just hide all other apps, hold command-option and click the Finder symbol in the dock. To also minimize Finder windows, use this freeware program
http://www.versiontracker.com/morein...005&db=mac
|
|
The low-end Mac Pro is the most overpriced Mac since the IIvx
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: May 2001
Status:
Offline
|
|
Wow--thanks for the quick responses!
The first script:
tell application "Finder"
set visible of every process to false
activate
end tell
works, but gives an error message after minimizing all apps: "Finder got an error: can't continue". Any idea why?
The other script has some sort of syntax error on the "end try" line; it says it expects "on" instead of "end."
tell application "Finder"
try
set visible of every process to false
end try--THIS line here is causing the error
activate
end tell
One thing I've been looking for without success is a good website with basic Applescript vocabulary and tutorials...any suggestions?
Thanks again--the MacNN community is always so helpful, it's great.
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Feb 2001
Status:
Offline
|
|
Use this one:
tell application "Finder"
try
set visible of every process to false
on error
end try
activate
end tell
(148)
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: May 2001
Status:
Offline
|
|
Thanks for your suggestions--the website is great.
And AppleScript, the revised script works perfectly. Thanks a lot![/LIST]null
|
|
|
| |
|
|
|
 |
 |
|
 |
| |
|
|
|

|
|
 |
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
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|