Exemple #1
0
        private static void Start(
            string proposedAcName,
            string processName,
            Coordinates coordinates,
            int interval
            )
        {
            var acWorker = VacEnvironment.GetAcWorker();
            var acName   = proposedAcName;

            if (string.IsNullOrWhiteSpace(acName))
            {
                acName = Guid.NewGuid().ToString();
            }

            var ac = new AutoClicker
            {
                Name        = acName,
                Active      = true,
                Coordinates = coordinates,
                Interval    = interval,
                ProcessName = processName,
            };

            try
            {
                acWorker?.AutoClickers?.Add(acName, ac);
                ac.Init();

                ConsoleHelper.WriteMessage($"Autoclicker '{acName}' started!");
            }
            catch (Exception exc)
            {
                // Something went wrong, ensure the autoclicker worker doesn't keep track of this instance anymore.
                if (acWorker is { } && acName is { })
        public void Execute(string[] arguments)
        {
            var acWorker = VacEnvironment.GetAcWorker();

            acWorker?.Picnic();

            ConsoleHelper.WriteMessage("All autoclickers stopped!");
        }
        public void Execute(string[] arguments)
        {
            var acWorker        = VacEnvironment.GetAcWorker();
            var formattedString = acWorker?.GetAutoClickerStatusString();

            if (!string.IsNullOrWhiteSpace(formattedString))
            {
                ConsoleHelper.WriteMessage(formattedString);
            }
        }
Exemple #4
0
        public void Execute(string[] arguments)
        {
            if (arguments.Length != 1)
            {
                ConsoleHelper.WriteError("Expected one argument, example Pause usage 'pause N'");
                return;
            }

            var acName = arguments[0];

            var acWorker = VacEnvironment.GetAcWorker();

            acWorker?.GetAutoclicker(acName)?.Pause();

            ConsoleHelper.WriteMessage($"autoclicker {acName} paused!");
        }