<table class="provenance-header" style="border: 0; border-collapse: collapse; margin: 0 0 16px 0; width: 100%;">
<tr style="border: 0;">
<td style="border: 0; vertical-align: top; padding: 0 24px 0 0;">

> **Source:** [https://my.remarkbox.com/2fc4f7e6-4208-11e9-9d31-040140774501](https://my.remarkbox.com/2fc4f7e6-4208-11e9-9d31-040140774501)  
> **Snapshot:** 2026-04-27T03:27:12Z  
> **Generator:** Remarkbox `97a1fff`  
>
> *This is a subthread snapshot. The living document lives at the source URI above — it may have been edited, extended, or replied-to since.*

</td>
<td style="border: 0; vertical-align: top; width: 200px; text-align: right;">

![Scan for living source](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJQAAACUAQAAAABdRz15AAABJklEQVR42s1WMY4DQQxC+QD//yU/8AGbuybNSXYRa6XMbIFYg3EwHyV81TsABERx2Ite+Kz/voNBJkgt5rLFA12Sxk8uB3jhBgX4Bs/c6NMNnltWPdK+g/5F0r860Le2eavcRm6/l5UCEwMaeP29LI7xjBjAtb7G8qDID/17wa/EDGrMvb723AM0lWetr60HU0w09LjEU+0cPXLhWt95xq2lOHDLT3FfmphQiGvWfp60z+QSBjrRl7+jvNcj5DpxAfVh+72ZECWeM3YHeVWCj6Obgvv+TRMBiWjhwn9Jg2ZzpmXdPySW60FPyN7P3buRogudJ/sjW4NX+zIWQRO60X+yzw00D9U52udQXc0Tfmj2NQN10j9C7wCcudB3HjV40L/v/r/7A+nqZSTdLRg5AAAAAElFTkSuQmCC)

</td>
</tr>
</table>

\@Zett activate will bring the app to the front whether it is open or
not. So really, all you need to do is check if the app you\'re looking
for is frontmost. If it is, you hide it. If it isn\'t, you activate it.
Ideally this should work but I don\'t care enough anymore to test it.

    set appName to "Mail"
    set needsActivation to false
    tell application "System Events"
      if frontmost of process appName then
        set visible of process appName to false
      else
        set needsActivation to true
      end if
    end tell

    if needsActivation then
      tell application appName to activate
    end if


---

**Source:** [https://my.remarkbox.com/2fc4f7e6-4208-11e9-9d31-040140774501](https://my.remarkbox.com/2fc4f7e6-4208-11e9-9d31-040140774501)  
**Snapshot:** 2026-04-27T03:27:12Z  
**Generator:** Remarkbox `97a1fff`
