<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>DisplayFusion RSS: Closing chrome window via trigger</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=1ad0a213-d9b5-4bd5-9a4b-d5204ffa5d31" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=1ad0a213-d9b5-4bd5-9a4b-d5204ffa5d31</link>
<description>DisplayFusion RSS: Closing chrome window via trigger</description>
<lastBuildDate>Sun, 19 Apr 2026 18:05:11 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=1ad0a213-d9b5-4bd5-9a4b-d5204ffa5d31</generator>
<item>
<title>RE: Closing chrome window via trigger</title>
<link>https://www.displayfusion.com/Discussions/View/closing-chrome-window-via-trigger/?ID=1ad0a213-d9b5-4bd5-9a4b-d5204ffa5d31#2</link>
<pubDate>Fri, 02 Oct 2020 15:14:22 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/closing-chrome-window-via-trigger/?ID=1ad0a213-d9b5-4bd5-9a4b-d5204ffa5d31#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[If you're wanting to open it if it's not already open, you could do something like this:
Code
Copy
Select All
using System;
using System.Drawing;
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
// Try to get the window
IntPtr window = BFS.Windo...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
If you're wanting to open it if it's not already open, you could do something like this:<br/>
<br/>
<div id="" class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019da6eafdf371a3978ef93163639975" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019da6eafdf371a3978ef93163639975Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019da6eafdf371a3978ef93163639975Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;

public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        // Try to get the window
        IntPtr window = BFS.Window.GetWindowByText("windowtitlehere");
    
        // Check if the window exists
        if (window == IntPtr.Zero)
        {
            // If it doesn't exist, launch it
            // Insert code to launch the app here
        }
        else
        {
            // If it does exist, focus it
            BFS.Window.Focus(window);
        }
    }
}</pre><textarea id="code019da6eafdf371a3978ef93163639975" name="code019da6eafdf371a3978ef93163639975" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
Hope that helps!
</div>
]]></content:encoded>
</item>
<item>
<title>Closing chrome window via trigger</title>
<link>https://www.displayfusion.com/Discussions/View/closing-chrome-window-via-trigger/?ID=1ad0a213-d9b5-4bd5-9a4b-d5204ffa5d31</link>
<pubDate>Wed, 30 Sep 2020 21:23:03 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/closing-chrome-window-via-trigger/?ID=1ad0a213-d9b5-4bd5-9a4b-d5204ffa5d31</guid>
<category>DisplayFusion</category>
<description><![CDATA[I'm trying to a build the following trigger: When Zoom opens up for a meeting, open or bring to focus a PWA chrome app that I have installed. The app process is chrome since it's a Chrome PWA
I have the trigger running but the problem is that I can only get it to open a new window for the app an...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I'm trying to a build the following trigger: When Zoom opens up for a meeting, open or bring to focus a PWA chrome app that I have installed. The app process is chrome since it's a Chrome PWA<br/>
<br/>
I have the trigger running but the problem is that I can only get it to open a new window for the app and can't make it bring to focus the existing window if it's already open. At the end of the day I have around 5 or 6 instances/windows of the chrome app running which is annoying<br/>
<br/>
How would you go about doing this?<br/>
<br/>
In my trigger I did this<br/>
<br/>
On creation of the zoom window....<br/>
<br/>
1. Run custom function to kill any windows<br/>
   uint appID = BFS.Application.GetAppIDByWindow(BFS.Window.GetWindowByText("[window title of chrome PWA]");<br/>
   BFS.Application.Kill(appID)}<br/>
   <br/>
2. Open new window of PWA<br/>
<br/>
But that custom funtion kills the whole chrome process and any existing windows I had of normal chrome and not just the window with that title.
</div>
]]></content:encoded>
</item>
</channel>
</rss>