I can get a list of the joysticks connected to my PC.
But now I want to send effects for example to send a command that will make a button click for example the triangle button or the square button. 

But I'm not sure how to continue with the effects and how to send the commands to the buttons.

I'm stuck in the HandleJoystick method.

    namespace Ps4_Controller
    {
        public partial class Form1 : Form
        {
            DirectInput input = new DirectInput();
            Joystick stick;
    
            public Form1()
            {
                InitializeComponent();
    
                stick = ListJoysticks()[0];
            }
    
            private Joystick[] ListJoysticks()
            {
                List<Joystick> sticks = new List<Joystick>();
    
                foreach (DeviceInstance device in input.GetDevices(DeviceClass.GameControl, DeviceEnumerationFlags.AttachedOnly))
                {
                    Joystick stick = new Joystick(input, device.InstanceGuid);
                    stick.Acquire();
                    
                    foreach (DeviceObjectInstance deviceObject in stick.GetObjects(DeviceObjectTypeFlags.Axis))
                    {
                        stick.GetObjectPropertiesById(deviceObject.ObjectId).Range = new InputRange(-100, 100);
                    }
                    sticks.Add(stick);
                }
                return sticks.ToArray();
            }
    
            private void HandleJoystick()
            {
                Joystick stick = ListJoysticks()[0];
                int[] axis = new int[0];
    
                foreach (DeviceObjectInstance doi in stick.GetObjects())
                {
                    axis = new int[axis.Length + 1];
                    axis[axis.Length - 1] = doi.Offset;
                }
    
                EffectParameters ep = new EffectParameters();
                DeviceInstance stick1 = new DeviceInstance();
                
    
                Effect effect = new Effect(stick.);
            }
    
            private void Form1_Load(object sender, EventArgs e)
            {
    
            }
    }