View Single Post
Old 04-23-2019, 02:44 AM   #2598
earhax
Human being with feelings
 
earhax's Avatar
 
Join Date: Nov 2015
Location: earth
Posts: 472
Default

Quote:
Originally Posted by X-Raym View Post
@earhax
I think you'll only need

Code:
start_time, end_time = reaper.GetSet_ArrangeView2( proj, isSet, screen_x_start, screen_x_end )
and
Code:
reaper.SetEditCurPos( time, moveview, seekplay )

and a bit of math to mix these two functions :P
I tried to figure out how to do it this way since it seems pretty simple. But I got an error. Here is the script as I wrote it.

Code:
start_time, end_time = reaper.GetSet_ArrangeView2( proj, isSet, screen_x_start, screen_x_end )
time = 0.9 * end_time
reaper.SetEditCurPos( time, moveview, seekplay )
I'm not sure why this is bad. But the error is complaining about the argument #2 in the reaper.GetSet_ArrangeView2 function (boolean expected, got nil). And since I'm not sure how the script gets the arguments for these functions, or which ones (if any) are automatically pulled from REAPER/project data, I think I'm a long way from being able to make this work only having these two functions to start with.

Last edited by earhax; 04-23-2019 at 02:44 AM. Reason: forgot code close tag
earhax is offline   Reply With Quote