<?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: Advanced functions when changing profiles; or macros?</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=477e3aa0-6762-4561-9002-71d006750f84" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=477e3aa0-6762-4561-9002-71d006750f84</link>
<description>DisplayFusion RSS: Advanced functions when changing profiles; or macros?</description>
<lastBuildDate>Thu, 09 Apr 2026 07:33:08 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=477e3aa0-6762-4561-9002-71d006750f84</generator>
<item>
<title>RE: Advanced functions when changing profiles; or macros?</title>
<link>https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#9</link>
<pubDate>Thu, 27 Nov 2014 02:40:08 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#9</guid>
<category>DisplayFusion</category>
<description><![CDATA[Awesome! You can disable the toast popups in the Settings &gt; Advanced Settings window]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Awesome! You can disable the toast popups in the Settings &gt; Advanced Settings window <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: Advanced functions when changing profiles; or macros?</title>
<link>https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#8</link>
<pubDate>Thu, 27 Nov 2014 01:13:15 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#8</guid>
<category>DisplayFusion</category>
<description><![CDATA[Not bad. Congrats buddy.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Not bad. Congrats buddy.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Advanced functions when changing profiles; or macros?</title>
<link>https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#7</link>
<pubDate>Wed, 26 Nov 2014 21:49:00 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#7</guid>
<category>DisplayFusion</category>
<description><![CDATA[yep that did the trick! thanks a bunch guys, works like a charm! i'm off to disable the toast message pop-ups now]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
yep that did the trick! thanks a bunch guys, works like a charm! i'm off to disable the toast message pop-ups now   <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-laugh-beam.light.svg" alt=":laugh:" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":laugh:" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Advanced functions when changing profiles; or macros?</title>
<link>https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#6</link>
<pubDate>Wed, 26 Nov 2014 21:36:10 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#6</guid>
<category>DisplayFusion</category>
<description><![CDATA[That was actually a bug in 7.0 Beta 9, but we've just posted 7.0 Beta 10, and it should be all fixed up. Could you try running your function from the hotkey again after updating to Beta 10?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
That was actually a bug in 7.0 Beta 9, but we've just posted 7.0 Beta 10, and it should be all fixed up. Could you try running your function from the hotkey again after updating to Beta 10?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Advanced functions when changing profiles; or macros?</title>
<link>https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#5</link>
<pubDate>Wed, 26 Nov 2014 21:19:28 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#5</guid>
<category>DisplayFusion</category>
<description><![CDATA[ah apparently i was still using stable, while this is a beta feature. so i updated to beta and have been messing around with the code. i have no real idea how C# works, but i did manage to make the function work.... almost. here's what i have so far:
Code
Copy
Select All
using System;
using ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
ah apparently i was still using stable, while this is a beta feature. so i updated to beta and have been messing around with the code. i have no real idea how C# works, but i did manage to make the function work.... almost. here's what i have so far:<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="#code019d7128bd51760b9020768e559b9262" 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('code019d7128bd51760b9020768e559b9262Js'); 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="code019d7128bd51760b9020768e559b9262Js" 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)
{
//running a custom scripted function is the same as running a regular function from the DisplayFusion API.
//just reference the function by name, and DisplayFusion will run it
BFS.DisplayFusion.RunFunction("Load Next Monitor Profile (alphabetically)");

//you can run built-in functions too
BFS.DisplayFusion.RunFunction("Move All Windows to Current Monitor");
}
}</pre><textarea id="code019d7128bd51760b9020768e559b9262" name="code019d7128bd51760b9020768e559b9262" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
this code does exactly what i want it to do, but ONLY if i run it from the code editor. once i run it from a hotkey or titlebar button, nothing happens. DF pops up a "running: room switch", but it doesn't change anything.<br/>
<br/>
i'm assuming this line is the issue:<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="#code019d7128bd54778ca00aa7c567a01312" 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('code019d7128bd54778ca00aa7c567a01312Js'); 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="code019d7128bd54778ca00aa7c567a01312Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">public static void Run(IntPtr windowHandle)</pre><textarea id="code019d7128bd54778ca00aa7c567a01312" name="code019d7128bd54778ca00aa7c567a01312" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
since it says this above:<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="#code019d7128bd56741b9ff89d24deb145db" 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('code019d7128bd56741b9ff89d24deb145dbJs'); 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="code019d7128bd56741b9ff89d24deb145dbJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">// 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</pre><textarea id="code019d7128bd56741b9ff89d24deb145db" name="code019d7128bd56741b9ff89d24deb145db" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
but sadly i have no earthly idea what the parameter needs to be changed to.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Advanced functions when changing profiles; or macros?</title>
<link>https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#4</link>
<pubDate>Wed, 26 Nov 2014 20:09:05 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#4</guid>
<category>DisplayFusion</category>
<description><![CDATA[On the function tab there are some buttons at the top. The one that says add scripted is what you want.
The code can be in C# or visual basic. Default is C#.
There isn't any documentation on display fusions functions yet so what you're going to do is type BFS. And an intellisense box will show ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
On the function tab there are some buttons at the top. The one that says add scripted is what you want.<br/>
<br/>
The code can be in C# or visual basic. Default is C#.<br/>
There isn't any documentation on display fusions functions yet so what you're going to do is type BFS. And an intellisense box will show up that you can go through to get more information on what functions do what.<br/>
<br/>
I won't be back at my computer till later today so I can't give you more detail then that off memory. I'll post back here when I have more info for you if need be.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Advanced functions when changing profiles; or macros?</title>
<link>https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#3</link>
<pubDate>Wed, 26 Nov 2014 17:37:08 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[awesome! i'd certainly be willing to learn, do you know if there's a guide or how-to written up somewhere? (unless it's something like java script, in that case i'm lost). if not, i'd very much appreciate you writing up the function for me. thanks!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
awesome! i'd certainly be willing to learn, do you know if there's a guide or how-to written up somewhere? (unless it's something like java script, in that case i'm lost). if not, i'd very much appreciate you writing up the function for me. thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Advanced functions when changing profiles; or macros?</title>
<link>https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#2</link>
<pubDate>Wed, 26 Nov 2014 17:11:52 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[This is possible with a  custom function.
If you don't want to/don't know how to write it I could get it written for you later today.
Just let me know.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
This is possible with a  custom function.<br/>
If you don't want to/don't know how to write it I could get it written for you later today.<br/>
Just let me know.  <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-laugh-squint.light.svg" alt=":D" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":D" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
<item>
<title>Advanced functions when changing profiles; or macros?</title>
<link>https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84</link>
<pubDate>Wed, 26 Nov 2014 16:03:25 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/advanced-functions-when-changing-profiles-or-macros/?ID=477e3aa0-6762-4561-9002-71d006750f84</guid>
<category>DisplayFusion</category>
<description><![CDATA[I've been an avid pro user of DF for about a year now and loooove it. Anyway, I'm trying to figure out if i can add custom functions on to the changing of a profile. Specifically, I'm trying to do the following:
I have two monitors in two different rooms. I've set up the profiles to change the p...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I've been an avid pro user of DF for about a year now and loooove it. Anyway, I'm trying to figure out if i can add custom functions on to the changing of a profile. Specifically, I'm trying to do the following:<br/>
<br/>
I have two monitors in two different rooms. I've set up the profiles to change the primary monitor and default sound device with a custom key combination. However, since the monitors are in different rooms, I also want all the windows to shift to the other monitor at the same time. Right now I'm just using the "move all windows to current monitor' shortcut, but this of course requires another key combination. It's not a huge inconvenience, but if possible I would like it to switch the windows to the primary monitor or next screen along with the profile change. I know I could change the profiles to just disable the second monitor, hence moving all the windows, but I'd still prefer being able to leave both monitors connected.<br/>
<br/>
Thank you very much!!!
</div>
]]></content:encoded>
</item>
</channel>
</rss>