the volume thing... cant figure it out :
Code:
if hold == true then
local tr = reaper.GetSelectedTrack(0,0)
cur_vol = reaper.GetMediaTrackInfo_Value(tr,"D_VOL")
mx, my = reaper.GetMousePosition()
cur_pos = my - ly -- ly is last reaper.GetMousePosition() so it starts counting from 0
end
this code is triggerd when left click is hold, now what I cant figure out how to move fader relative to this possition, or how to translate pixel to fader movement. Every time this code is called the mouse position is 0 and from there it should move fader from what ever position it is