<?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: Can't get the script to work</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=7349d44c-b37b-415a-a05e-5ef3c673f3d3" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=7349d44c-b37b-415a-a05e-5ef3c673f3d3</link>
<description>DisplayFusion RSS: Can't get the script to work</description>
<lastBuildDate>Wed, 15 Apr 2026 22:59:13 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=7349d44c-b37b-415a-a05e-5ef3c673f3d3</generator>
<item>
<title>RE: Can't get the script to work</title>
<link>https://www.displayfusion.com/Discussions/View/cant-get-the-script-to-work/?ID=7349d44c-b37b-415a-a05e-5ef3c673f3d3#4</link>
<pubDate>Thu, 06 Aug 2015 20:25:47 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/cant-get-the-script-to-work/?ID=7349d44c-b37b-415a-a05e-5ef3c673f3d3#4</guid>
<category>DisplayFusion</category>
<description><![CDATA[Awesome, glad to hear you were able to get it sorted! We'll add it to the online repository]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Awesome, glad to hear you were able to get it sorted! We'll add it to the online repository <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-smile.light.svg" alt=":)" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":)" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Can't get the script to work</title>
<link>https://www.displayfusion.com/Discussions/View/cant-get-the-script-to-work/?ID=7349d44c-b37b-415a-a05e-5ef3c673f3d3#3</link>
<pubDate>Thu, 06 Aug 2015 12:17:13 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/cant-get-the-script-to-work/?ID=7349d44c-b37b-415a-a05e-5ef3c673f3d3#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[Ok, thank you. I've changed this, but it don't work again.
What's about:
//Environment.GetEnvironmentVariable("ProgramFiles(x86)") + "\\Steam\\Steam.exe";
Is this important? Nonetheless i have found an alternative solution:
Code
Copy
Select All
using System;
using System.Drawing;
// The ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Ok, thank you. I've changed this, but it don't work again.<br/>
<br/>
What's about:<br/>
<br/>
//Environment.GetEnvironmentVariable("ProgramFiles(x86)") + "\\Steam\\Steam.exe";<br/>
<br/>
Is this important? Nonetheless i have found an alternative solution:<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="#code019d935ec16270428f1d68659a0dfdf4" 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('code019d935ec16270428f1d68659a0dfdf4Js'); 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="code019d935ec16270428f1d68659a0dfdf4Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;

// The 'windowHandle' parameter will contain the window handle for the:
//   - Active window when run by hotkey
//   - Window Location target when run by a Window Location rule
//   - TitleBar Button owner when run by a TitleBar Button
//   - Jump List owner when run from a Taskbar Jump List
//   - Currently focused window if none of these match
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
//Laedt das Steam Big Picture Profil (Steam zuvor auf Big Picture einstellen)
BFS.DisplayFusion.LoadMonitorProfile("Steam Big Picture");

//Laedt das entsprechende Audio-Geraet fuer HDMI (kann auch in den Bildschrimprofilen eingestellt werden)
BFS.Audio.SetDefaultPlaybackSounds("Panasonic-TV-4 (Nvidia High Definition Audio)");
        
//Starte Steam im Big Picture Mode
BFS.Application.Start("D:\\Steam\\Steam.exe", "");

//beim beenden auf Steam warten
BFS.Application.WaitForExitByFile("*Steam.exe", 0);

//Laedt das Default Monitor Profil
BFS.DisplayFusion.LoadMonitorProfile("GW2760 only TV out");

//Laedt wieder das Standard Audio-Geraet (kann auch in den Bildschrimprofilen eingestellt werden)
BFS.Audio.SetDefaultPlaybackSounds("Speakers (Sound Blaster Z)");
}
}</pre><textarea id="code019d935ec16270428f1d68659a0dfdf4" name="code019d935ec16270428f1d68659a0dfdf4" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
You see i switch to another audio-source even. OK, i know you can do this in monitor profiles, but why not directly in the script?<br/>
<br/>
When i found a solution to start Steam immediately in Big Picture Mode, i will update the whole script.<br/>
<br/>
Greetings<br/>
<br/>
Update:<br/>
I've uploaded the correct script to your database. It works like charm now.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Can't get the script to work</title>
<link>https://www.displayfusion.com/Discussions/View/cant-get-the-script-to-work/?ID=7349d44c-b37b-415a-a05e-5ef3c673f3d3#2</link>
<pubDate>Wed, 05 Aug 2015 17:32:11 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/cant-get-the-script-to-work/?ID=7349d44c-b37b-415a-a05e-5ef3c673f3d3#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[Ah, the path to Steam needs to have double-backslashes for the directory delimiters, like this:
Code
Copy
Select All
string steamDirectory = @"J:\\Program Files (x86)\\Steam\\Steam.exe";
I'll fix that up in the repository, thanks!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Ah, the path to Steam needs to have double-backslashes for the directory delimiters, 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="#code019d935ec17d747792d78b8175b24d9d" 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('code019d935ec17d747792d78b8175b24d9dJs'); 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="code019d935ec17d747792d78b8175b24d9dJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">string steamDirectory = @"J:\\Program Files (x86)\\Steam\\Steam.exe";</pre><textarea id="code019d935ec17d747792d78b8175b24d9d" name="code019d935ec17d747792d78b8175b24d9d" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
I'll fix that up in the repository, thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>Can't get the script to work</title>
<link>https://www.displayfusion.com/Discussions/View/cant-get-the-script-to-work/?ID=7349d44c-b37b-415a-a05e-5ef3c673f3d3</link>
<pubDate>Mon, 03 Aug 2015 13:31:31 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/cant-get-the-script-to-work/?ID=7349d44c-b37b-415a-a05e-5ef3c673f3d3</guid>
<category>DisplayFusion</category>
<description><![CDATA[Hey there,
i have a problem to get the script from orlando2bjr to work properly.
Code
Copy
Select All
using System;
using System.Drawing;
// The 'windowHandle' parameter will contain the window handle for the:
//   - Active window when run by hotkey
//   - Window Location target when run...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hey there,<br/>
<br/>
i have a problem to get the script from orlando2bjr to work properly.<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="#code019d935ec189772090d3feb20fe7068c" 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('code019d935ec189772090d3feb20fe7068cJs'); 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="code019d935ec189772090d3feb20fe7068cJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;

// The 'windowHandle' parameter will contain the window handle for the:
//   - Active window when run by hotkey
//   - Window Location target when run by a Window Location rule
//   - TitleBar Button owner when run by a TitleBar Button
//   - Jump List owner when run from a Taskbar Jump List
//   - Currently focused window if none of these match
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
//replace these variables with ones that will work on your system
string defaultProfile = "[your default profile]";
string bigPictureProfile = "[your big picture profile]";
string steamDirectory = @"J:\Program Files (x86)\Steam\Steam.exe"; //Environment.GetEnvironmentVariable("ProgramFiles(x86)") + "\\Steam\\Steam.exe";
const int waitForever = 0;

// get current profile name
string currentProfileName = BFS.DisplayFusion.GetCurrentMonitorProfile();
if(currentProfileName == "")
currentProfileName = defaultProfile;

// close Steam if it is running
uint steamID;
bool wasSteamRunning = BFS.Application.IsAppRunningByFile(steamDirectory);
if(wasSteamRunning)
{
steamID = BFS.Application.GetAppIDByFile(steamDirectory);
BFS.Application.Kill(steamID);

// wait for Steam to exit
BFS.Application.WaitForExitByAppID(steamID, waitForever);
}

// wake up the monitors
BFS.General.WakeMonitors();

// load the big picture monitor profile and wait for it to switch
BFS.DisplayFusion.LoadMonitorProfile(bigPictureProfile);
string profileName = BFS.DisplayFusion.GetCurrentMonitorProfile();
while(!profileName.Equals(bigPictureProfile, StringComparison.OrdinalIgnoreCase))
{
BFS.General.ThreadWait(100);
profileName = BFS.DisplayFusion.GetCurrentMonitorProfile();
}

// start Steam in Big Picture mode
steamID = BFS.Application.Start(steamDirectory, "-bigpicture");

// wait for Steam to exit
BFS.Application.WaitForExitByAppID(steamID, waitForever);

// restart Steam in normal mode
if(wasSteamRunning)
BFS.Application.Start(steamDirectory, "");

// wake up the monitors
BFS.General.WakeMonitors();

// load the last running monitor profile and wait for it to switch
BFS.DisplayFusion.LoadMonitorProfile(currentProfileName);
}
}</pre><textarea id="code019d935ec189772090d3feb20fe7068c" name="code019d935ec189772090d3feb20fe7068c" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
I've set my default and Big Picture profie and also the path to steam. When i start the script the monitor change to the other and steam get closed but dont start again.<br/>
<br/>
What did i do wrong?<br/>
<br/>
Thx and greeetings
</div>
]]></content:encoded>
</item>
</channel>
</rss>