<?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: Question about scripting limitations</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=fc1cf9b9-7452-4494-b854-4af8b1e7b25c" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=fc1cf9b9-7452-4494-b854-4af8b1e7b25c</link>
<description>DisplayFusion RSS: Question about scripting limitations</description>
<lastBuildDate>Sun, 10 May 2026 15:06:06 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=fc1cf9b9-7452-4494-b854-4af8b1e7b25c</generator>
<item>
<title>RE: Question about scripting limitations</title>
<link>https://www.displayfusion.com/Discussions/View/question-about-scripting-limitations/?ID=fc1cf9b9-7452-4494-b854-4af8b1e7b25c#4</link>
<pubDate>Thu, 25 Sep 2014 20:59:04 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/question-about-scripting-limitations/?ID=fc1cf9b9-7452-4494-b854-4af8b1e7b25c#4</guid>
<category>DisplayFusion</category>
<description><![CDATA[Sorry, I missed your second question. The scripts are compiled internally using .NET 2.0 unless you are in Windows 8 and only have .NET 4.0 installed.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Sorry, I missed your second question. The scripts are compiled internally using .NET 2.0 unless you are in Windows 8 and only have .NET 4.0 installed.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Question about scripting limitations</title>
<link>https://www.displayfusion.com/Discussions/View/question-about-scripting-limitations/?ID=fc1cf9b9-7452-4494-b854-4af8b1e7b25c#3</link>
<pubDate>Thu, 25 Sep 2014 20:58:20 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/question-about-scripting-limitations/?ID=fc1cf9b9-7452-4494-b854-4af8b1e7b25c#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[You're in luck! We have a few ways that we're going to help you out in Beta 3:
- BFS.Audio will have built-in volume controls (up, down... etc)
- You can now reference external assemblies when editing a scripted function (no more need for reflection)
Both of those should help make your scripti...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
You're in luck! We have a few ways that we're going to help you out in Beta 3:<br/>
- BFS.Audio will have built-in volume controls (up, down... etc)<br/>
- You can now reference external assemblies when editing a scripted function (no more need for reflection)<br/>
<br/>
Both of those should help make your scripting much easier, stay tuned for Beta 3.  <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: Question about scripting limitations</title>
<link>https://www.displayfusion.com/Discussions/View/question-about-scripting-limitations/?ID=fc1cf9b9-7452-4494-b854-4af8b1e7b25c#2</link>
<pubDate>Thu, 25 Sep 2014 20:16:05 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/question-about-scripting-limitations/?ID=fc1cf9b9-7452-4494-b854-4af8b1e7b25c#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[I fixed the script and it now modifies the volume. The issue? If you reflect assemblies through DisplayFusion, those assemblies can use a .NET version no greater than 3.5. 4.0 Client Profile and up do not work.
It also seems like the compiler being used is lower than C# 3.0, as the var implicit ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I fixed the script and it now modifies the volume. The issue? If you reflect assemblies through DisplayFusion, those assemblies can use a .NET version <i>no greater than</i> 3.5. 4.0 Client Profile and up do not work.<br/>
<br/>
It also seems like the compiler being used is lower than C# 3.0, as the <b>var</b> implicit type keyword is not recognized in the editor.<br/>
<br/>
All in all this functionality is awesome, can't wait to do more cool stuff with it <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>Question about scripting limitations</title>
<link>https://www.displayfusion.com/Discussions/View/question-about-scripting-limitations/?ID=fc1cf9b9-7452-4494-b854-4af8b1e7b25c</link>
<pubDate>Wed, 24 Sep 2014 21:34:34 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/question-about-scripting-limitations/?ID=fc1cf9b9-7452-4494-b854-4af8b1e7b25c</guid>
<category>DisplayFusion</category>
<description><![CDATA[I have a script that modifies the system volume. It runs correctly in Visual Studio but not when run from DisplayFusion. Note that the function compiles in the "Edit Scripted Function" editor (had to back the syntax down a bit, what C# version does this compile against?)
Here is the code. When r...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I have a script that modifies the system volume. It runs correctly in Visual Studio but not when run from DisplayFusion. Note that the function compiles in the "Edit Scripted Function" editor (had to back the syntax down a bit, what C# version does this compile against?)<br/>
<br/>
Here is the code. When run (verbatim) from Visual Studio, it increments the system volume by 5. It runs in DisplayFusion but does not do anything to the volume. It relies on another dll, which is why I'm instantiating the Callables class in the reflected dll (cannot include the reference to the audio API calls I'm using from DisplayFusion).  The handler for AssemblyResolve loads that second external dll when the first one fails due to being reflected. I hope this makes sense... I'm just curious what limitations the scripting interface has.<br/>
<br/>
Edit: apologies for the poorly formatted code... I think it may be a limitation of the website. Pasting into a text editor should make it readable <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" /><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="#code019e126c94c5758ea90ad51186fda5ee" 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('code019e126c94c5758ea90ad51186fda5eeJs'); 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="code019e126c94c5758ea90ad51186fda5eeJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Reflection;
using System.IO;

public static class DisplayFusionFunction
{
public static void Run()
{
//Your code goes here
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
Assembly asm = Assembly.LoadFile(@"C:\DisplayFusionFunctions\BkgFuncs.dll");
Type type = asm.GetType("BkgFuncs.Callables");
object obj = Activator.CreateInstance(type);
type.InvokeMember("IncrementVolume", BindingFlags.Default | BindingFlags.InvokeMethod, null, obj, new object[] { 5 });
}

static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
  {
string dllPath = @"C:\DisplayFusionFunctions";
string assemblyPath = Path.Combine(dllPath, args.Name.Substring(0,args.Name.IndexOf(',')) + ".dll");
return Assembly.LoadFrom(assemblyPath);
  }
}</pre><textarea id="code019e126c94c5758ea90ad51186fda5ee" name="code019e126c94c5758ea90ad51186fda5ee" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
</channel>
</rss>