Example #1
0
        public void AoMBot()
        {
            AltarOfMadness[] bots = new AltarOfMadness[EmulatorCount];
            for (int ind = EmulatorCount - 1; ind >= 0; ind--)
            {
                bots[ind] = new AltarOfMadness(Emulators[ind]);
                Rectangle screen = Screen.GetRect(Emulators[ind]);
                User32.SetWindowPos(Emulators[ind].MainWindowHandle, 0, 0, 0, screen.Width, screen.Width, 1);
            }


            while (true)//replace with start stop button states
            {
                for (int ind = EmulatorCount - 1; ind >= 0; ind--)
                {
                    if (Emulators[ind].HasExited == true)
                    {
                        MainWindow.main.UpdateLog = Emulators[ind].MainWindowTitle + " has terminated. Please stop bot.";
                        return;
                    }
                    bots[ind].Start();
                }
            }
        }
Example #2
0
        public void AoMBot()
        {
            //Build Bot[]
            AltarOfMadness[] bots = new AltarOfMadness[0];

            //Builds Bot[] to for ADB clients
            if (L2RDevices != null)
            {
                bots = new AltarOfMadness[L2RDevices.Length];

                for (int i = 0; i < bots.Length; i++)
                {
                    bots[i] = new AltarOfMadness(NullEmulator, L2RDevices[i]);
                }
            }

            //Builds Bot[] to for ADB clients
            if (Emulators != null)
            {
                bots = new AltarOfMadness[Emulators.Length];

                for (int i = 0; i < bots.Length; i++)
                {
                    bots[i] = new AltarOfMadness(Emulators[i], NullL2RDev);
                }
            }

            foreach (AltarOfMadness bot in bots)
            {
                //Checks if user deselected process to exclude from automation.
                foreach (ListBoxItem item in listProcessList.Items)
                {
                    bool isSelected = false;

                    string itemContent = "";

                    item.Dispatcher.Invoke(new Action(() => isSelected = item.IsSelected));

                    item.Dispatcher.Invoke(new Action(() => itemContent = item.Content.ToString()));

                    if (isSelected && itemContent == bot.BotName)
                    {
                        bot.Complete = true;
                    }
                }

                BotBuilder(bot);
            }


            while (true)//replace with start stop button states
            {
                for (int i = 0; i < bots.Length; i++)
                {
                    if (bots[i].Complete == false)
                    {
                        bots[i].Start();
                    }
                }
            }
        }