using System; using System.Drawing; using System.Threading; public static class VoiceBotScript { //public static bool ranOnce = false; public static void Run(IntPtr windowHandle) { if(!BFS.VoiceBot.IsMacroRunning("elite log reader")) { BFS.Speech.TextToSpeech("log reader is not running"); //BFS.VoiceBotActions.RunMacro("elite log reader"); } else { BFS.Speech.TextToSpeech("log reader is running"); } } }
public static void Run(IntPtr windowHandle) { // If the window property is IntPtr.Zero, it doesn't exist. Run the script, and create the property if( BFS.Window.GetWindowProperty(windowHandle, "IsEliteLogRunnerRunning") == IntPtr.Zero ) { BFS.Window.SetWindowProperty(windowHandle, "IsEliteLogRunnerRunning", new IntPtr(1)); BFS.Speech.TextToSpeech("log reader is not running"); //BFS.VoiceBotActions.RunMacro("elite log reader"); } else { BFS.Speech.TextToSpeech("log reader is running"); } }