Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

User Image
Muffo99
2 discussion posts
I recently set up a voice activated command that opened up a commandline, ran a series of commands and then afterwards the commandline closes. Every time the macro runs, I get tabbed out of what I'm currently working on and the commandline window becomes the current active window. I found a way to prevent the commandline from being brought to the front but yet to find a way that stops my input from effecting the window I was concentrating on prior.

Anyone know of any way I could prevent the commandline from becoming the active window or anyway I could make a macro that wouldn't have to open the commandline every time?
Dec 26, 2021  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Unfortunately I don't think either of these would be possible.

Sorry!
Jan 5, 2022 (modified Jan 27, 2022)  • #2
User Image
cj89898
1 discussion post
Through some quick testing I was able to find a way to do this via a batch file

Code

using System;
using System.Drawing;
using System.Diagnostics;
public static class VoiceBotScript
{
public static void Run(IntPtr windowHandle)
{
Process process = new Process
{
StartInfo =
{
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true,
FileName = "C:\\path\\to\\your\\file.bat",
Arguments = "1"
}
};
process.Start();
process.WaitForExit();
if(process.HasExited)
{
BFS.Dialog.ShowMessageInfo("exited");
}
}
}
Jan 27, 2022 (modified Jan 27, 2022)  • #3
User Image
Muffo99
2 discussion posts
Quote:
Through some quick testing I was able to find a way to do this via a batch file

Code

using System;
using System.Drawing;
using System.Diagnostics;
public static class VoiceBotScript
{
public static void Run(IntPtr windowHandle)
{
Process process = new Process
{
StartInfo =
{
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true,
FileName = "C:\\path\\to\\your\\file.bat",
Arguments = "1"
}
};
process.Start();
process.WaitForExit();
if(process.HasExited)
{
BFS.Dialog.ShowMessageInfo("exited");
}
}
}


I couldn't get this to run anything. The commandline I'm using is an .exe file. Did you intend for this to be ran as a custom script through voice bot?
Jan 30, 2022  • #4
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)