<?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: Threading and Processes</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=018c46d8-30fe-759d-945f-d3c526a04196" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=018c46d8-30fe-759d-945f-d3c526a04196</link>
<description>DisplayFusion RSS: Threading and Processes</description>
<lastBuildDate>Fri, 22 May 2026 22:54:49 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=018c46d8-30fe-759d-945f-d3c526a04196</generator>
<item>
<title>RE: Threading and Processes</title>
<link>https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196#7</link>
<pubDate>Mon, 11 Dec 2023 20:52:31 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196#7</guid>
<category>DisplayFusion</category>
<description><![CDATA[Glad to hear you found a good solution!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Glad to hear you found a good solution!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Threading and Processes</title>
<link>https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196#6</link>
<pubDate>Fri, 08 Dec 2023 21:59:23 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196#6</guid>
<category>DisplayFusion</category>
<description><![CDATA[I've found the most stable solution is to do all the Vinyl loading, keyboard stuffing, and mose clicks before I loaded the Tint app.    The inconsistant loading time of Tint is what was causing the problems.
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I've found the most stable solution is to do all the <span style="text-decoration:underline;">Vinyl</span> loading, keyboard stuffing, and mose clicks <i>before</i> I loaded the <span style="text-decoration:underline;">Tint</span> app.    The inconsistant loading time of <span style="text-decoration:underline;">Tint</span> is what was causing the problems.<br/>
<br/>
public static class DisplayFusionFunction<br/>
{<br/>
    public static void Run(IntPtr windowHandle)<br/>
    {<br/>
        BFS.Audio.PlayFile("C:\\Windows\\Media\\Windows Proximity Connection.wav");    <br/>
        <br/>
        <b>/* VINYL */</b><br/>
        BFS.DisplayFusion.RunFunction("Focus 2");<br/>
        BFS.General.Sleep(500);<br/>
        BFS.Application.Start("C:\\Program Files (x86)\\YIHomePCClientIntl\\YIHomePCClientIntl.exe");<br/>
        BFS.General.ThreadWait(4500);<br/>
        BFS.Input.SendKeys("+({VK_50}{VK_65}){VK_76}{VK_76}{VK_80}{VK_82}{VK_79}");<br/>
        BFS.Input.SendKeys("{VK_13}");<br/>
        <br/>
        <b>/* VINYL Mouse Clicks */</b><br/>
        // Pick APT group; Click show/hide cams<br/>
        BFS.General.Sleep(1000);        <br/>
        BFS.Input.SetMousePosition(2095, 230);<br/>
        BFS.General.ThreadWait(500);    <br/>
        BFS.Input.LeftClickMouse();<br/>
        BFS.General.ThreadWait(500);    <br/>
        BFS.Input.SetMousePosition(1964, 182);<br/>
        BFS.General.ThreadWait(500);    <br/>
        BFS.Input.LeftClickMouse();<br/>
        BFS.General.Sleep(500);<br/>
<br/>
        <br/>
        <b>/* TINT */</b><br/>
        BFS.Audio.PlayFile("C:\\Windows\\Media\\tada.wav");<br/>
        BFS.DisplayFusion.RunFunction("Focus 1");<br/>
        BFS.General.Sleep(500);<br/>
        BFS.Application.Start("D:\\APT SMART PSS\\Smart Professional Surveillance System\\SmartPSS\\SmartPSS.exe");    <br/>
        BFS.General.ThreadWait(5000);    <br/>
                <br/>
        /*<br/>
        // Max Vinyl Bay window
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Threading and Processes</title>
<link>https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196#5</link>
<pubDate>Fri, 08 Dec 2023 20:47:53 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196#5</guid>
<category>DisplayFusion</category>
<description><![CDATA[No, just before and after that snippet.   My session had expired so that's why everything seemed locked earlier.
BFS.General.Sleep(5000);
/* VINYL Mouse Clicks */
// Pick APT group; Click show/hide cams
BFS.Input.SetMousePosition(2095, 230);
BFS.Input.LeftClickMouse();
BFS.Input.SetMousePos...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
No, just before and after that snippet.   My session had expired so that's why everything seemed locked earlier.<br/>
<br/>
    <b>BFS.General.Sleep(5000);</b>    <br/>
        <br/>
        /* VINYL Mouse Clicks */<br/>
        // Pick APT group; Click show/hide cams<br/>
        BFS.Input.SetMousePosition(2095, 230);<br/>
        BFS.Input.LeftClickMouse();<br/>
        BFS.Input.SetMousePosition(1964, 182);<br/>
        BFS.Input.LeftClickMouse();<br/>
        <b>BFS.General.Sleep(500);</b>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Threading and Processes</title>
<link>https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196#3</link>
<pubDate>Fri, 08 Dec 2023 19:31:09 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[Did you already try a ThreadWait between each line in that VINYL Mouse Clicks section? If so, how long did you set the ThreadWaits to?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Did you already try a ThreadWait between each line in that VINYL Mouse Clicks section? If so, how long did you set the ThreadWaits to?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Threading and Processes</title>
<link>https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196#4</link>
<pubDate>Fri, 08 Dec 2023 19:31:09 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196#4</guid>
<category>DisplayFusion</category>
<description><![CDATA[Did you already try a ThreadWait between each line in that VINYL Mouse Clicks section? If so, how long did you set the ThreadWaits to?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Did you already try a ThreadWait between each line in that VINYL Mouse Clicks section? If so, how long did you set the ThreadWaits to?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Threading and Processes</title>
<link>https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196#2</link>
<pubDate>Fri, 08 Dec 2023 17:30:25 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[...............]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
...............
</div>
]]></content:encoded>
</item>
<item>
<title>Threading and Processes</title>
<link>https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196</link>
<pubDate>Fri, 08 Dec 2023 00:33:43 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/threading-and-processes/?ID=018c46d8-30fe-759d-945f-d3c526a04196</guid>
<category>DisplayFusion</category>
<description><![CDATA[I am attempting to run 2 security camera apps back to back within a custom script.   The first one loads without a need for username or password, but the second app requires a username & password plus a few mouse clicks to open the camera group.
Referencing the .pdf attachment:
The code on the ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
<i>I am attempting to run 2 security camera apps back to back within a custom script.   The first one loads without a need for username or password, but the second app requires a username & password plus a few mouse clicks to open the camera group.</i>   <br/>
<br/>
<b>Referencing the .pdf attachment:</b><br/>
<br/>
The code on the left with the ✔️ runs correctly 95% of the time; however, depending on the processor load, the section with the mouse clicks is not run in the order intended.  <br/>
<br/>
-It seems to fail mostly after a cold start. <br/>
-If the script has been run before,it works correctly nearly 100% of the time, launching both apps and then focusing on the second app & performing the correct mouse clicks..  I'm guessing that's due to the apps being read from cache, reducing load time.<br/>
-I experimented with .Sleep() & .Threadwait(), but successful results were not consistant.    <br/>
<br/>
Given this dilemma, I considered running each camera's actions in its own Thread() &/or Process as a solution.   This was an educated guess, but I wanted a way to stop the app loadings from interfering with the other apps scripting.<br/>
<br/>
At right (?) is my first attempt at threading.    It runs; however, the results are disappointly the same as above.    I guess threading is not the solution needed.<br/>
<br/>
Any suggestions?
</div>
]]></content:encoded>
</item>
</channel>
</rss>