PDA

View Full Version : Applescript -hiding desktop drive icons




macstatic
Aug 27, 2013, 07:36 AM
I've had success with a couple of Applescript scripts in hiding hard drive icons on the Finder desktop that I don't need to access (the Mac Pro uses them for backup and cache purposes):

Hiding the drive icon
quit application "Finder"
tell application "System Events" to
set visible of disk "BACKUP DRIVE" to false
delay 1
launch application "Finder"

Making the drive visible again
quit application "Finder"
tell application "System Events" to
set visible of disk "BACKUP DRIVE" to true
delay 1
launch application "Finder"

However I'm not able to hide a certain drive (nothing happens when I run the "hide" script). This is a bootable backup drive which is daily updated using Chronosync. Is it un-hideable because it's bootable? Is there anything else I can do to hide this drive icon from the desktop?
I'm using OSX 10.6.8.



kryten2
Aug 27, 2013, 07:58 AM
You can try Finder Preferences.

macstatic
Aug 28, 2013, 03:19 PM
Yes, but this hides ALL drives, or ALL external drives, which is not what I want.

see.solve.
Aug 31, 2013, 08:57 AM
What about solutions posted in the "How to hide a specific drive from desktop? (http://forums.macrumors.com/showthread.php?t=1302248)" thread?

macstatic
Aug 31, 2013, 02:34 PM
Thanks. I tried the Terminal suggestion there and the result was the same as with my Applescript, but.... unlike Applescript it gave me an error message: "Permission denied".
So I tried adding myself as a new user for the drive, enabling read/write" and then it worked.

Thanks for heading me in the right direction. I'll have to figure out the correct ownership for my drives.