<?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>VoiceBot RSS: Referencing External DLLs from a Script</title>
<atom:link href="https://www.voicebot.net/Discussions/RSS/?TopicID=a4188bb8-13b3-4fae-af34-de983c74c7d5" rel="self" type="application/rss+xml" />
<link>https://www.voicebot.net/Discussions/RSS/?TopicID=a4188bb8-13b3-4fae-af34-de983c74c7d5</link>
<description>VoiceBot RSS: Referencing External DLLs from a Script</description>
<lastBuildDate>Thu, 10 Sep 2026 07:54:16 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.voicebot.net/Discussions/RSS/?TopicID=a4188bb8-13b3-4fae-af34-de983c74c7d5</generator>
<item>
<title>Referencing External DLLs from a Script</title>
<link>https://www.voicebot.net/Discussions/View/referencing-external-dlls-from-a-script/?ID=a4188bb8-13b3-4fae-af34-de983c74c7d5</link>
<pubDate>Sat, 14 May 2016 03:55:58 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/referencing-external-dlls-from-a-script/?ID=a4188bb8-13b3-4fae-af34-de983c74c7d5</guid>
<category>VoiceBot</category>
<description><![CDATA[This is an example of how to use an external .NET assembly from a VoiceBot script. This example references the Newtonsoft Json library, so you'll need to download that before you use this example.
Code
Copy
Select All
using System;&#xA;using System.Drawing;&#xA;using Newtonsoft.Json;&#xA;// T...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
This is an example of how to use an external .NET assembly from a VoiceBot script. This example references the Newtonsoft Json library, so you'll need to download that before you use this example.

<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="#code01a08a4f6fae778da1b384de77e5d424" class="ClipboardCopyControl"><img src="https://www.voicebot.net/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('code01a08a4f6fae778da1b384de77e5d424Js'); return false;"><img src="https://www.voicebot.net/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="code01a08a4f6fae778da1b384de77e5d424Js" name="code01a08a4f6fae778da1b384de77e5d424Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%;min-height:75px">using System;&#xA;using System.Drawing;&#xA;using Newtonsoft.Json;&#xA;// The &#x27;windowHandle&#x27; parameter will contain the window handle for the:&#xA;//   - Active window when run by hotkey&#xA;//   - Trigger target when run by a Trigger rule&#xA;//   - TitleBar Button owner when run by a TitleBar Button&#xA;//   - Jump List owner when run from a Taskbar Jump List&#xA;//   - Currently focused window if none of these match&#xA;public static class DisplayFusionFunction&#xA;{&#xA;    //to get this script to work, you need the Newtonsoft Json library downloaded to your computer,&#xA;    //then add the path to the Newtonsoft.Json.dll in the references of this script&#xA;    //http://www.newtonsoft.com/json&#xA;    &#xA;    public static void Run(IntPtr windowHandle)&#xA;    {&#xA;        //create a new test object&#xA;        TestObject test = new TestObject(1, &quot;testing&quot;);&#xA;        &#xA;        //convert the object into json and display it to the user&#xA;        string json = JsonConvert.SerializeObject(test);&#xA;        BFS.Dialog.ShowMessageInfo(json);&#xA;        &#xA;        //take the json and make a new test object with the newtonsoft deserializer&#xA;        TestObject test2 = JsonConvert.DeserializeObject&lt;TestObject&gt;(json);&#xA;        BFS.Dialog.ShowMessageInfo(&quot;Number: &quot; &#x2B; test2.Number &#x2B; &quot;\nText: &quot; &#x2B; test2.Text);&#xA;    }&#xA;    &#xA;    //this object will be used to test the functionality of the newtonsoft json library&#xA;    private class TestObject&#xA;    {&#xA;        public int Number;&#xA;        public string Text;&#xA;        &#xA;        public TestObject(int number, string text)&#xA;        {&#xA;            this.Number = number;&#xA;            this.Text = text;&#xA;        }&#xA;    }&#xA;}</pre><textarea id="code01a08a4f6fae778da1b384de77e5d424" name="code01a08a4f6fae778da1b384de77e5d424" style="position:absolute;top:0;left:-999999px;width:1px;height:1px"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
</channel>
</rss>