Пример #1
0
        public override void Action()
        {
            SharedMemoryInstance mem     = controller.mem.GetInstance("global"); // Change the string to change namespace
            MouseRequest         mouse   = controller.mouse;
            KeyboardRequest      key     = controller.key;
            ToolRequest          tool    = controller.tool;
            List <int>           invoker = this.activation.hotkeys;
            string mouseGesture          = this.activation.mouseGesture;

            //Begin generated code
        }
Пример #2
0
        public RepeatClient(int port)
        {
            this.port             = port;
            synchronizationEvents = new Dictionary <int, AutoResetEvent>();
            returnedObjects       = new Dictionary <int, JToken>();

            sendQueue  = new ConcurrentQueue <string>();
            sendSignal = new AutoResetEvent(false);

            messageProcessor = new MessageProcessor(this);

            systemClient = new SystemClientRequest(this);
            systemHost   = new SystemHostRequest(this);

            mem   = new SharedMemoryRequest(this);
            mouse = new MouseRequest(this);
            key   = new KeyboardRequest(this);
            tool  = new ToolRequest(this);
        }
Пример #3
0
        public static byte[] manipulateMouse(Command command)
        {
            MouseRequest     request = (MouseRequest)Util.Serialization.deserialize(command.data);
            Screen           screen  = Screen.AllScreens[request.monitorIndex];
            SendInputWrapper wrapper = new SendInputWrapper();
            double           x       = (lerp(0, screen.Bounds.Width - 1, request.x / request.ax));
            double           y       = (lerp(0, screen.Bounds.Height - 1, request.y / request.ay));

            wrapper.sim_mov((int)(((screen.Bounds.X + x) / 2.0)), (int)(((screen.Bounds.Y + y) / 2.0)));
            if (request.isClick)
            {
                if (request.isRightClick)
                {
                    wrapper.sim_right_click();
                }
                else
                {
                    wrapper.sim_left_click();
                }
            }
            return(new byte[] { });
        }