
    local CountSelTrack = reaper.CountSelectedTracks(0);
    if CountSelTrack == 0 then return end;

retval, preset = reaper.GetUserInputs("ChangeAllTrackVolume", 1, "", "")    
if retval == true then 
    for i = 1, CountSelTrack do;
	   local SelTrack = reaper.GetSelectedTrack(0, i-1);



	   reaper.SetMediaTrackInfo_Value(SelTrack,"D_VOL",(10^((preset )/20)));
    end;
  reaper.Undo_OnStateChangeEx("Set volume for selected track(s)", -1, -1)
        end;

