<?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: Abort screensaver programmatically</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=38f9c279-b78e-42a9-b777-c2dfb48cf714" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=38f9c279-b78e-42a9-b777-c2dfb48cf714</link>
<description>DisplayFusion RSS: Abort screensaver programmatically</description>
<lastBuildDate>Tue, 12 May 2026 16:17:36 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=38f9c279-b78e-42a9-b777-c2dfb48cf714</generator>
<item>
<title>RE: Abort screensaver programmatically</title>
<link>https://www.displayfusion.com/Discussions/View/abort-screensaver-programmatically/?ID=38f9c279-b78e-42a9-b777-c2dfb48cf714#6</link>
<pubDate>Mon, 05 Mar 2018 15:58:01 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/abort-screensaver-programmatically/?ID=38f9c279-b78e-42a9-b777-c2dfb48cf714#6</guid>
<category>DisplayFusion</category>
<description><![CDATA[Thanks for the updates! Glad to hear you were able to get something working there. We will definitely let you know when we're able to add a screen saver starts/exits Trigger event.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Thanks for the updates! Glad to hear you were able to get something working there. We will definitely let you know when we're able to add a screen saver starts/exits Trigger event.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Abort screensaver programmatically</title>
<link>https://www.displayfusion.com/Discussions/View/abort-screensaver-programmatically/?ID=38f9c279-b78e-42a9-b777-c2dfb48cf714#5</link>
<pubDate>Thu, 01 Mar 2018 07:53:58 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/abort-screensaver-programmatically/?ID=38f9c279-b78e-42a9-b777-c2dfb48cf714#5</guid>
<category>DisplayFusion</category>
<description><![CDATA[I use your website screen saver, how do I find the file name on that? And should i recognize it by process filename, or some other?
EDIT: I found the Website.scr in the DisplayFusion folder, but the trigger does not fire on process end, neither on full path or if i put a * in front.
EDIT2: The ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
<del>I use your website screen saver, how do I find the file name on that? And should i recognize it by process filename, or some other?</del><br/>
<br/>
EDIT: I found the Website.scr in the DisplayFusion folder, but the trigger does not fire on process end, neither on full path or if i put a * in front.<br/>
<br/>
EDIT2: The trigger fires if I manually run the Website.scr file, but not if I start it through DF.<br/>
<br/>
EDIT3: I ended up writing a custom screensaver detecter script, looking for any application with *.scr, and if it finds any then wait for it to stop existing, and maximize the specific window. It's not pretty, but it works(ish).<br/>
<br/>
EDIT4: I found the script being too slow, it could take 1 second or more before it maximized, I need it to maximize instantly (the user should not be able to see the desktop at any point).<br/>
<br/>
EDIT5: I ended up with the script below, I think that was the only one I could make work consistently and satisfyingly. However it would really be nice if a screensaver exit could broadcast an event, which we could act upon.<br/>
<br/>
<div 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="#code019e1cfac271767cbe7ef705ffccd12d" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e1cfac271767cbe7ef705ffccd12dJs'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;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="code019e1cfac271767cbe7ef705ffccd12dJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;

public static class DisplayFusionFunction
{

    static int mouseX=0;
    static int mouseY=0;
    static bool maximizeTriggerFired = true;
    public static void Run(IntPtr windowHandle)
    {
            IntPtr torWindow = BFS.Application.GetMainWindowByFile("*java.exe");
    
        while(true){
                if(torWindow == IntPtr.Zero){
                    torWindow =  BFS.Application.GetMainWindowByFile("*java.exe");
                }
             
                BFS.General.ThreadWait(50);
            
                if(torWindow == IntPtr.Zero){continue;} //If the window does not exist, do nothing
                if(BFS.Window.IsMaximized(torWindow)){continue;} //If the windows is already maximized, do nothing
                if(BFS.Application.GetMainWindowByFile("*TeamViewer.exe") != IntPtr.Zero){continue;} //If teamviewer is running, do nothing
            
                //If mouse has been moved, maximize the window. The code cannot reach here if the window is already maximized, due to previous if-statement.
                if(BFS.Input.GetMousePositionX() != mouseX || BFS.Input.GetMousePositionY() != mouseY){
                    mouseX = BFS.Input.GetMousePositionX();
                    mouseY = BFS.Input.GetMousePositionY();
                    BFS.Window.Maximize(torWindow);
                }
        }
    }
}</pre><textarea id="code019e1cfac271767cbe7ef705ffccd12d" name="code019e1cfac271767cbe7ef705ffccd12d" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Abort screensaver programmatically</title>
<link>https://www.displayfusion.com/Discussions/View/abort-screensaver-programmatically/?ID=38f9c279-b78e-42a9-b777-c2dfb48cf714#4</link>
<pubDate>Wed, 28 Feb 2018 18:47:34 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/abort-screensaver-programmatically/?ID=38f9c279-b78e-42a9-b777-c2dfb48cf714#4</guid>
<category>DisplayFusion</category>
<description><![CDATA[You could try using a Process Ended Trigger event, and put the name of the screen saver file in it, like this:
*DFSSaver.scr
In theory that should fire when the DisplayFusion Screen Saver exits.
If you use just the Windows screen saver settings instead of DisplayFusion, you'd need the name of ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
You could try using a Process Ended Trigger event, and put the name of the screen saver file in it, like this:<br/>
<br/>
*DFSSaver.scr<br/>
<br/>
In theory that should fire when the DisplayFusion Screen Saver exits.<br/>
<br/>
If you use just the Windows screen saver settings instead of DisplayFusion, you'd need the name of the screen saver itself (e.g. *Ribbons.scr)
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Abort screensaver programmatically</title>
<link>https://www.displayfusion.com/Discussions/View/abort-screensaver-programmatically/?ID=38f9c279-b78e-42a9-b777-c2dfb48cf714#3</link>
<pubDate>Wed, 28 Feb 2018 08:42:43 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/abort-screensaver-programmatically/?ID=38f9c279-b78e-42a9-b777-c2dfb48cf714#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[It seems moving the mouse did the trick indeed. I tried with both keypress and mouseclick with no luck. Thanks!
Is it furthermore possible to create a trigger for when screensaver exits? I wish to maximize a window when the screensaver is closed, if certain conditions are met.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
It seems moving the mouse did the trick indeed. I tried with both keypress and mouseclick with no luck. Thanks!<br/>
<br/>
Is it furthermore possible to create a trigger for when screensaver exits? I wish to maximize a window when the screensaver is closed, if certain conditions are met.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Abort screensaver programmatically</title>
<link>https://www.displayfusion.com/Discussions/View/abort-screensaver-programmatically/?ID=38f9c279-b78e-42a9-b777-c2dfb48cf714#2</link>
<pubDate>Tue, 27 Feb 2018 18:39:26 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/abort-screensaver-programmatically/?ID=38f9c279-b78e-42a9-b777-c2dfb48cf714#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[You could probably use a Scripted Function in the Trigger that moves the mouse a little bit, to deactivate the screen saver. The same Scripted Function could also maximize the window as well. What's the window title of the window you want maximized? I can write up a sample to get you started.
Th...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
You could probably use a Scripted Function in the Trigger that moves the mouse a little bit, to deactivate the screen saver. The same Scripted Function could also maximize the window as well. What's the window title of the window you want maximized? I can write up a sample to get you started.<br/>
<br/>
Thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>Abort screensaver programmatically</title>
<link>https://www.displayfusion.com/Discussions/View/abort-screensaver-programmatically/?ID=38f9c279-b78e-42a9-b777-c2dfb48cf714</link>
<pubDate>Tue, 27 Feb 2018 12:49:45 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/abort-screensaver-programmatically/?ID=38f9c279-b78e-42a9-b777-c2dfb48cf714</guid>
<category>DisplayFusion</category>
<description><![CDATA[Hi,
Is it possible to somehow abort the screensaver programmatically? I need to take a screenshot of a computer's desktop before i remote into it with TeamViewer, but the screensaver is blocking the view.
I tried creating a trigger with a function that disables the screensaver, but nothing happ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hi,<br/>
<br/>
Is it possible to somehow abort the screensaver programmatically? I need to take a screenshot of a computer's desktop before i remote into it with TeamViewer, but the screensaver is blocking the view.<br/>
<br/>
I tried creating a trigger with a function that disables the screensaver, but nothing happens. I have also attached a simple Show Notification function to the trigger, which is fired just fine, so I'm sure the trigger is fired.<br/>
<br/>
Furthermore I need to maximize a window when the screensaver is aborted - is this possible? And if so, how?
</div>
]]></content:encoded>
</item>
</channel>
</rss>