<?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: Script to keep an app active</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=d5c4abc9-bc89-4cc4-a490-65388174d196" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=d5c4abc9-bc89-4cc4-a490-65388174d196</link>
<description>DisplayFusion RSS: Script to keep an app active</description>
<lastBuildDate>Mon, 06 Apr 2026 13:54:33 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=d5c4abc9-bc89-4cc4-a490-65388174d196</generator>
<item>
<title>RE: Script to keep an app active</title>
<link>https://www.displayfusion.com/Discussions/View/script-to-keep-an-app-active/?ID=d5c4abc9-bc89-4cc4-a490-65388174d196#4</link>
<pubDate>Tue, 04 Jul 2023 15:12:18 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-to-keep-an-app-active/?ID=d5c4abc9-bc89-4cc4-a490-65388174d196#4</guid>
<category>DisplayFusion</category>
<description><![CDATA[Glad to hear you got it sorted out. Thanks for the help @JLJTGR!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Glad to hear you got it sorted out. Thanks for the help @JLJTGR!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Script to keep an app active</title>
<link>https://www.displayfusion.com/Discussions/View/script-to-keep-an-app-active/?ID=d5c4abc9-bc89-4cc4-a490-65388174d196#3</link>
<pubDate>Mon, 03 Jul 2023 16:45:32 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-to-keep-an-app-active/?ID=d5c4abc9-bc89-4cc4-a490-65388174d196#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[Thanks so much for posting.  I added the line you suggested.  I fact, I added one before each step.  Still didn't work.  I restarted display fusion and viola, it's working.  Got each of the messages and had to click ok.
I commented the messages out and it's working perfectly.  Hasn't timed out i...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Thanks so much for posting.  I added the line you suggested.  I fact, I added one before each step.  Still didn't work.  I restarted display fusion and viola, it's working.  Got each of the messages and had to click ok.<br/>
<br/>
I commented the messages out and it's working perfectly.  Hasn't timed out in 5 hours!  So cool.<br/>
<br/>
Thanks again!  Have a great 4th!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Script to keep an app active</title>
<link>https://www.displayfusion.com/Discussions/View/script-to-keep-an-app-active/?ID=d5c4abc9-bc89-4cc4-a490-65388174d196#2</link>
<pubDate>Sun, 02 Jul 2023 19:03:41 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-to-keep-an-app-active/?ID=d5c4abc9-bc89-4cc4-a490-65388174d196#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[Are you sure that pressing Enter will work on the dialog when focused?  Custom windows have to designate what buttons are used for Enter/Esc.  But Space will always activate the current tab-order button.  If this window does not start with the correct button highlighted, you might use a TAB keyst...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Are you sure that pressing Enter will work on the dialog when focused?  Custom windows have to designate what buttons are used for Enter/Esc.  But Space will always activate the current tab-order button.  If this window does not start with the correct button highlighted, you might use a TAB keystroke to move to it first.  What I'm saying is, make sure that the keystrokes you're scripting really do work for this window.<br/>
<br/>
Is the focus part of the script working?  Is the trigger even firing at all?  You can insert <b>System.Windows.Forms.MessageBox.Show("test")</b> to make sure that your script is even running from the trigger.<br/>
<br/>
It's also possible that this window is running as administrator which makes it impossible for non-admin programs to manipulate them.  DisplayFusion has an admin service, but I don't know if that is what is used for scripting.
</div>
]]></content:encoded>
</item>
<item>
<title>Script to keep an app active</title>
<link>https://www.displayfusion.com/Discussions/View/script-to-keep-an-app-active/?ID=d5c4abc9-bc89-4cc4-a490-65388174d196</link>
<pubDate>Sun, 02 Jul 2023 08:11:16 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-to-keep-an-app-active/?ID=d5c4abc9-bc89-4cc4-a490-65388174d196</guid>
<category>DisplayFusion</category>
<description><![CDATA[Hello.  I'm trying to write a script that will press enter on an application's inactive warning pop up windowfor the windows default button to stay logged in.  I'm not really familar with the language and I don't want to spend days right now teaching myself.
Below is what I have.  I've pieced it...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hello.  I'm trying to write a script that will press enter on an application's inactive warning pop up windowfor the windows default button to stay logged in.  I'm not really familar with the language and I don't want to spend days right now teaching myself.  <br/>
<br/>
Below is what I have.  I've pieced it together from other scripts, it's quite simple.  It's not working though.  There is a trigger monitoring for the pop up window text of "Cherwell Inactivity Warning" which is in the title.<br/>
<br/>
If the focus changes during the script, I would love to return to the prior application and cursor/mouse location before the pop up arrived once it's been satisified, but I can deal with that later.<br/>
<br/>
Any help is greatly appreciated.<br/>
___________________________________________________________________________________<br/>
Imports System<br/>
Imports System.Drawing<br/>
<br/>
' The windowHandle parameter will contain the window handle for the:<br/>
'   - Active window when run by hotkey<br/>
'   - Trigger target when run by a Trigger rule<br/>
'   - TitleBar Button owner when run by a TitleBar Button<br/>
'   - Jump List owner when run from a Taskbar Jump List<br/>
'   - Currently focused window if none of these match<br/>
<br/>
Public Class DisplayFusionFunction<br/>
<br/>
    Public Shared Sub Run(ByVal windowHandle As IntPtr)<br/>
        BFS.Window.Focus(windowHandle)<br/>
        BFS.Input.SendKeys("{Enter}")<br/>
    End Sub<br/>
<br/>
End Class
</div>
]]></content:encoded>
</item>
</channel>
</rss>