Remote Control Slider

I want to control a slider on another app( not my app). But the same function applies to sliders on my xojo app. All I want the xojo app to do is press the mouse left button down while my remote device says to hold it down(simulated mouse click type button). Then when I release my remote device button, the mouse click is released and back to normal. This part works fine and I don’t need help with the mouse click. Both sets of code below will click the mouse down and up like this

mouseclick(true) //press it down
mouseclick(false) // release it

[code]dim x as Integer = System.MouseX
dim y as Integer = System.MouseY
call RemoteControlMBS.MacMouseClick(x, y, false, MouseDown)

//dim p as PresskeyMBS
//p=new PresskeyMBS
//p.mouseclick(MouseDown)[/code]

The problem is that I want to use my remote mouse click feature, BUT at the same time use the real mouse to move the sliders up and down either on my app or any other app( or scroll bar etc ). What happens is that the mouse click down does work, but then I cannot use my mouse to move the slider up and down. I can understand the first block of code not allowing the mouse to move as it includes mouse position values which likely override any real mouse moves, so the mouse gets stuck with the first block. But the second block does not use mouse position, and I can move the mouse no problem while it is left clicked, but the sliders never move.

The mouse click feature is doing a lot more than just the mouse click before it gets to the mouse click, so there is a reason why I don’t want to use my mouse left button for a few certain tasks. But in testing, I am only testing Mouse click and move, none of the other code. Basically, the xojo app locates a certain slider on a screen, positions the mouse on it precisely, then left clicks, then I move the real mouse. Worst case is I have to use a combination of locateslider>leftclick>mousemove.

Any suggestions on how to do this?