<?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: if/else if problem i cant solve! :(</title>
<atom:link href="https://www.voicebot.net/Discussions/RSS/?TopicID=a4aeae6c-c861-4eca-ab85-0371ef17390c" rel="self" type="application/rss+xml" />
<link>https://www.voicebot.net/Discussions/RSS/?TopicID=a4aeae6c-c861-4eca-ab85-0371ef17390c</link>
<description>VoiceBot RSS: if/else if problem i cant solve! :(</description>
<lastBuildDate>Fri, 01 May 2026 22:31:07 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.voicebot.net/Discussions/RSS/?TopicID=a4aeae6c-c861-4eca-ab85-0371ef17390c</generator>
<item>
<title>RE: if/else if problem i cant solve! :(</title>
<link>https://www.voicebot.net/Discussions/View/ifelse-if-problem-i-cant-solve/?ID=a4aeae6c-c861-4eca-ab85-0371ef17390c#3</link>
<pubDate>Mon, 14 Jun 2021 20:35:36 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/ifelse-if-problem-i-cant-solve/?ID=a4aeae6c-c861-4eca-ab85-0371ef17390c#3</guid>
<category>VoiceBot</category>
<description><![CDATA[that worked! nice! had to change static class to "VoiceBotScript"
thank you very much!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
that worked! nice! had to change static class to "VoiceBotScript"<br/>
<br/>
thank you very much!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: if/else if problem i cant solve! :(</title>
<link>https://www.voicebot.net/Discussions/View/ifelse-if-problem-i-cant-solve/?ID=a4aeae6c-c861-4eca-ab85-0371ef17390c#2</link>
<pubDate>Mon, 14 Jun 2021 20:00:35 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/ifelse-if-problem-i-cant-solve/?ID=a4aeae6c-c861-4eca-ab85-0371ef17390c#2</guid>
<category>VoiceBot</category>
<description><![CDATA[I don't think Process.GetProcessByName takes a wildcard. We have a function that checks if a process is running though and does take a wildcard. Try this out:
Code
Copy
Select All
using System;
using System.Drawing;
public static class DisplayFusionFunction
{
public static void Run(IntPtr...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I don't think Process.GetProcessByName takes a wildcard. We have a function that checks if a process is running though and does take a wildcard. Try this out:<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="#code019de5aac4e77682b655a9a1f5d3d3fa" 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('code019de5aac4e77682b655a9a1f5d3d3faJs'); 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="code019de5aac4e77682b655a9a1f5d3d3faJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;

public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        // Process Name
        string windowText = "*firefox*";
        // If process is running then focus window
        if (BFS.Application.IsAppRunningByFile(windowText))
        {
            BFS.Window.Focus(BFS.Window.GetWindowByText(windowText));
        }
        // If process is not running output tts error
        else
        {
            BFS.Speech.TextToSpeech("Error");
        }
    }
}</pre><textarea id="code019de5aac4e77682b655a9a1f5d3d3fa" name="code019de5aac4e77682b655a9a1f5d3d3fa" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>if/else if problem i cant solve! :(</title>
<link>https://www.voicebot.net/Discussions/View/ifelse-if-problem-i-cant-solve/?ID=a4aeae6c-c861-4eca-ab85-0371ef17390c</link>
<pubDate>Sun, 13 Jun 2021 21:31:52 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/ifelse-if-problem-i-cant-solve/?ID=a4aeae6c-c861-4eca-ab85-0371ef17390c</guid>
<category>VoiceBot</category>
<description><![CDATA[with firefox being the example process. i dont see why this doesnt work.
Code
Copy
Select All
using System;
using System.Drawing;
using System.Diagnostics;
using System.ComponentModel;
public static class VoiceBotScript
{
public static void Run(IntPtr windowHandle)
{
// Process Name
...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
with firefox being the example process. i dont see why this doesnt work.<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="#code019de5aac4f470f5ad81abde58701b98" 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('code019de5aac4f470f5ad81abde58701b98Js'); 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="code019de5aac4f470f5ad81abde58701b98Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;
using System.Diagnostics;
using System.ComponentModel;

public static class VoiceBotScript
{
    public static void Run(IntPtr windowHandle)
    {
        // Process Name
        string windowText = "*firefox*";
        // If process is running then focus window
        if (Process.GetProcessesByName(windowText).Length &gt; 0)
        {
            BFS.Window.Focus(BFS.Window.GetWindowByText(windowText));
        }
        // If process is not running output tts error
        else if (Process.GetProcessesByName(windowText).Length &lt; 1)
        {
            BFS.Speech.TextToSpeech("Error");
        }
    }
}</pre><textarea id="code019de5aac4f470f5ad81abde58701b98" name="code019de5aac4f470f5ad81abde58701b98" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
</channel>
</rss>