Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 03-31-2015, 02:59 AM   #1
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default Select Items on right (or left) of cursor ??

I did a find in Action Window but nothing showed up for what i want..

Situation:

In Arrange , click somewhere on a Track area.
Now with an Action like : "Select all Items to the right of cursor" , all items on that Track,on the right of the cursor, will be selected.
And then ofcourse "Select all items to the left of cursor" will select all items to the left of cursor, belonging to that track.

Should i post this as Script request ?
vanhaze is offline   Reply With Quote
Old 03-31-2015, 03:11 AM   #2
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

So i did alittle searching around here at the forum and stumbled on this Python Script, made by Steve Folta:
(thank you Steve !!):

position = RPR_GetCursorPosition()

which_item = 0
num_items = RPR_CountMediaItems(0)
while which_item < num_items:
item = RPR_GetMediaItem(0, which_item)
which_item += 1
if RPR_GetMediaItemInfo_Value(item, "D_POSITION") >= position:
RPR_SetMediaItemInfo_Value(item, "B_UISEL", 1)
else:
RPR_SetMediaItemInfo_Value(item, "B_UISEL", 0)

RPR_UpdateArrange()


Now this is quite in the right direction for what i want but:
1) it selects ALL items to the right of cursor, not just the ones that are on the Track that is selected.
That is not what i want.
2) Furthermore, this script only can select items to the right of cursor, not to the left.
vanhaze is offline   Reply With Quote
Old 03-31-2015, 04:25 AM   #3
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

I use "Xenakios/SWS: Select items to end of track" (has a "to start" counterpart, too) but it's a tad different in that it looks for selected items to determine on which tracks and from where you want to select, not for edit cursor position and selected tracks.

Here is a custom action which I think does what you want (select to right):
EDIT: This macro has issues when playback is running. Sorry. I posted EEL ReaScripts for this purpose in post #6

A few slight changes can make it select to the left.


Writing a script would be fairly straightforward, but this works pretty well, methinks. A bit of custom action DIY training can't be wrong

Last edited by gofer; 03-31-2015 at 01:16 PM.
gofer is offline   Reply With Quote
Old 03-31-2015, 04:56 AM   #4
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

Hi Gofer, many thx and your action works exactly the way i wanted !

I studied your Action and now i am beginning to understand how it works, i am quite a Custom Action noob.. lol.

I made the "select al on left .." myself ; indeed piece of cake :0)

Great stuff !
vanhaze is offline   Reply With Quote
Old 03-31-2015, 05:33 AM   #5
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

YAY

Well, not really... I see bad behavior with this macro when playback is running

Probably a script will be better for this indeed.

Working something out when I get back home (if noone else beats me to it)

later
gofer is offline   Reply With Quote
Old 03-31-2015, 08:16 AM   #6
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

In the attachment is a zip archive of my humble take on these two actions as EEL Scripts. Needed to pack them as I can't attach .eel files directly

Unpack to your ReaScripts folder and then import to Reaper's action list as usual (via ReaScript: "Load..." button)
Attached Files
File Type: zip select right or left of edit cursor EEL ReaScripts.zip (1.2 KB, 207 views)
gofer is offline   Reply With Quote
Old 03-31-2015, 01:54 PM   #7
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Quote:
Originally Posted by gofer View Post
Well, not really... I see bad behavior with this macro when playback is running

Probably a script will be better for this indeed.
Is it the seeking? Is there any trick to stop that? Undo cursor does it too.

Maybe SWS would consider taking it out...
FnA is offline   Reply With Quote
Old 03-31-2015, 02:06 PM   #8
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Not only the seeking. Turns out "Time selection: Set start/end point" use the play cursor when playback is running . So the macro creates a super-tiny time selection in that case while the edit cursor hops to the end of project and back for nothing
Would sure be nice to have versions of these which only ever use the edit cursor for custom action building purposes.

While they are easy enough to do as scripts, I think it would be better to have them "easily collectible" as building blocks in SWS extensions, or even built in to stock Reaper.
gofer is offline   Reply With Quote
Old 03-31-2015, 02:09 PM   #9
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

Quote:
Originally Posted by gofer View Post
In the attachment is a zip archive of my humble take on these two actions as EEL Scripts. Needed to pack them as I can't attach .eel files directly

Unpack to your ReaScripts folder and then import to Reaper's action list as usual (via ReaScript: "Load..." button)
Well Gofer, you are a true Hero !

I just tested your EEL scripts and they made my whishes come true, hooray !

I imported them in Reaper 500pre21 - 64 bit, OSX 10.10.2 : 100% working,

Awesome, thank you so much !

Last edited by vanhaze; 03-31-2015 at 02:19 PM.
vanhaze is offline   Reply With Quote
Old 03-31-2015, 02:18 PM   #10
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Ah, yes. I agree 100%, gofer. Basic stuff.
FnA is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.