# Use launch() but have the app minimized?

**URL:** <https://discourse.processing.org/t/use-launch-but-have-the-app-minimized/26452>\
**Category:** Coding Questions\
**Created:** [December 22, 2020, 9:56pm UTC](https://discourse.processing.org/t/use-launch-but-have-the-app-minimized/26452 "2020-12-22T21:56:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CaseyJ](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/caseyj/32/15118_2.png) [@CaseyJ](https://discourse.processing.org/u/CaseyJ)\
**Post date:** [December 22, 2020, 9:56pm UTC](https://discourse.processing.org/t/use-launch-but-have-the-app-minimized/26452/1 "2020-12-22T21:56:09Z")

</div>

Is there anyway to use [launch()](https://processing.org/reference/launch_.html) but have the app be minimized when it loads so it doesn’t cover the Processing sketch?

---

<div class="post-metadata">

**Author:** ![RFullum](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/rfullum/32/10454_2.png) [@RFullum](https://discourse.processing.org/u/RFullum)\
**Post date:** [December 22, 2020, 10:18pm UTC](https://discourse.processing.org/t/use-launch-but-have-the-app-minimized/26452/2 "2020-12-22T22:18:18Z")

</div>

if you’re on a mac launch() uses the “open” command. You might be able to use the -g flag before the path.

`lauch("-g /Path/to/file/or/app");`

from the `open` man page:  
`-g Do not bring the application to the foreground.`

edit: I just tested. Adding the flag on mac doesn’t work. ☹

---

<div class="post-metadata">

**Author:** ![CaseyJ](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/caseyj/32/15118_2.png) [@CaseyJ](https://discourse.processing.org/u/CaseyJ)\
**Post date:** [December 22, 2020, 10:29pm UTC](https://discourse.processing.org/t/use-launch-but-have-the-app-minimized/26452/3 "2020-12-22T22:29:22Z")

</div>

That is creative and I salute the effort!

---

<div class="post-metadata">

**Author:** ![CaseyJ](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/caseyj/32/15118_2.png) [@CaseyJ](https://discourse.processing.org/u/CaseyJ)\
**Post date:** [December 22, 2020, 10:55pm UTC](https://discourse.processing.org/t/use-launch-but-have-the-app-minimized/26452/4 "2020-12-22T22:55:40Z")

</div>

For what it is worth I tried to launch() the sketch itself once it was running to kind of put it back on top per se. This did not work either.

---

<div class="post-metadata">

**Author:** ![RFullum](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/rfullum/32/10454_2.png) [@RFullum](https://discourse.processing.org/u/RFullum)\
**Post date:** [December 23, 2020, 12:11am UTC](https://discourse.processing.org/t/use-launch-but-have-the-app-minimized/26452/5 "2020-12-23T00:11:49Z")

</div>

That too is quite clever!

I got curious and looked at the launch() command on processing’s github to see if there was a way to pass flags within the arguments but i didn’t have the mental fortitude this time of night nor the knowledge of java to follow what’s going on in there.

> <https://github.com/processing/processing/blob/94144be998354ecf7a06d5301b7b4fab72df724c/java/src/processing/mode/java/runner/Runner.java>
