Hide Folders / Applications

Hi all,

I am very new to writing Applescript and also to these forums. I have done some searching on this topic but I haven’t found a conclusive answer that works yet, and was hoping someone would be able to help.

This may seem very simple, but as said I am new to this… :smiley:

In my Applications, and Utilities Files I have various applications and utilities that have been installed on my machine. In my dock I have placed both applications and utilities files to fan out to show what is available. Now, several of the items in these files, (while being a vital and necessary item to have installed) clog up the files, and therefore I am try to write an Applescript to hide these items.

I have read several articles about hiding running processes, but I simply want to hide dormant apps and utilities.

My idea would be to write a script that hides all the files I want to hide in one go, and then write a second to make them visible again when needed. I would then look to run the scripts in Automator to enable me to run them via Finder.

Can anyone help please ?

Many thanks

  • Neil Holmes

Model: Mac Book Pro 17" C2D
Browser: Safari
Operating System: Mac OS X (10.5)

I posted a few ways to accomplish this in the following thread…
http://bbs.macscripter.net/viewtopic.php?id=19260

Just another option to the above post.
If you place your applications and utilities that you want to make invisible in a folder, this would work…

try
-- Note: I named the folder in the Applications folder 'Extra Applications'.
tell application "System Events" to set visible of folder ":Applications:Extra Applications:" of startup disk to false
-- Note: I named the folder in the Utilities folder 'Extra Utilities'.
tell application "System Events" to set visible of folder ":Applications:Utilities:Extra Utilities:" of startup disk to false
do shell script "killall Finder"
end try
tell application "System Events" to quit

This script will make the folders visible…

try
tell application "System Events" to set visible of folder ":Applications:Extra Applications:" of startup disk to true
tell application "System Events" to set visible of folder ":Applications:Utilities:Extra Utilities:" of startup disk to true
do shell script "killall Finder"
end try
tell application "System Events" to quit

Tom

Thanks Tom_X… I didn’t realize System Events could be used to change the visibility of something. I just re-wrote one of my scripts to use system events and posted it in my visibility topic thread. See post #9 if you’re interested.
http://bbs.macscripter.net/viewtopic.php?id=19260

One thing to note: in Tom_X’s scripts he kills the Finder and quits System Events to make the visibility changes take effect. I’m using 10.5.2 and notice that the changes take effect without doing anything extra.

Hi regulus6633, That’s a very cool script you wrote on post #9.
It’s a bit over my head – more than a bit. :confused:

Tom

Thanks regulus6633, the script you have directed me to is exactly what I am looking for.

One final request, when I toggle the visibility of the selected applications and files I do not want to see, the changes are effective straight away in Finder, however, as these folders have been place in my Dock, (to fan out to see all), I need to run Killall Dock in Terminal before the changes are visible.

Is there a way to build this additional action into the script ?

Many thanks once again, this is a brilliant script, exactly what I have been looking for.

  • Neil Holmes

If you want that capability just add the following line to the end of the script…

do shell script "killall Dock"

Good luck.

One more thing:
I just updated the script in my visibility thread which fixed a small issue I saw, so download the script again from post #9 to get the change. Note: I didn’t add the killall dock part… you still have to do that yourself.