Slide potentiometer scrolling

I'm making a game controller and I need to use a slide potentiometer to scroll using mouse.h I already tried coding for it and it did not work .what code should I use for this?

I think a mouse sends out pulses (called mickies) not a DC level.

oh dear.

Perhaps a diagram of what you’re connecting together.
Your code so far in code tags, and what the slider is meant to replace in what application.

Other than that, the yellow wire is in the wrong place.

It's used for adjusting the interference in the game not for broadcast. Game link: Not For Broadcast on Steam

As I’m not a gamer, and have no idea what Steam is (other than water vapour).
I hope someone else can help.

Ok thanks for the help