Script to hide a program

How do I hide a program with a script?

Thanks for answers

Chris

Here’s a couple examples…

Hide everything except ScriptDebugger:


tell application "System Events"
	set visible of (every process whose visible is true and name is not "ScriptDebugger") to false
end tell

Hide all Firefox windows:


tell application "System Events"
	set visible of (every process whose name contains "Firefox") to false
end tell

Those should probably cover most of the ways you’d want to use it. :slight_smile:

Chris:

It would help us help you if you were a little more specific about your needs…

tell app “System Events”
set visible of application process “TextEdit” to false
end tell

Peter B.


20 seconds that separate ships passing in the night…

Glad neither of us are on the Titanic.

PB


Many thanks, you are to fast.
I wanted only to hide filemaker

Thanks again for the fast help
Chris

if you are only interested in hiding filemaker… why not just command-h the bugger?

What is the h-bugger?
I’m fairly new in the heaven of OSX, some expression I don’t knew.

Chris

Hi Christophe,

I don’t know, but this line hides an application

tell application "System Events" to set visible of application process "myApp" to false

I don’t no either the exact spelling of Filemaker, so replace myApp to it