|
|
|
03-03-2014, 04:17 AM
|
#1
|
Human being with feelings
Join Date: Mar 2013
Posts: 463
|
Select Media Item
How do I select a new item via ReaScript? I know I can run a series of actions to move the cursor around and select items underneath it, but I cant find a way to select a new item if I have an item ID variable in a script.
Is there some kind of "RPR_SelectMediaItem(ItemID)" function Im missing?
|
|
|
03-03-2014, 08:33 AM
|
#2
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
There's RPR_SetMediaItemSelected:
Code:
C: void SetMediaItemSelected(MediaItem* item, bool selected)
EEL: SetMediaItemSelected(MediaItem* item, bool selected)
Python: RPR_SetMediaItemSelected(MediaItem* item, Boolean selected)
(May need UI refreshing after RPR_SetMediaItemSelected)
Code:
RPR_UpdateArrange()
|
|
|
03-03-2014, 08:46 AM
|
#3
|
Human being with feelings
Join Date: Mar 2013
Posts: 463
|
Thanks, I worked out I could use the B_UISEL media item info value, but this is much neater.
There doesnt appear to be a difference between the two methods, is there?
|
|
|
03-03-2014, 08:53 AM
|
#4
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by matthewjumpsoffbuildings
Thanks, I worked out I could use the B_UISEL media item info value, but this is much neater.
There doesnt appear to be a difference between the two methods, is there?
|
No difference (I think SetMediaItemSelected is a newer function).
|
|
|
03-03-2014, 08:55 AM
|
#5
|
Human being with feelings
Join Date: Mar 2013
Posts: 463
|
Ah cool. Thanks for the tips.
Btw the wiki pages on the ReaScript API seem pretty undercooked in places, is there a better, more up to date resource?
|
|
|
03-03-2014, 09:08 AM
|
#6
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by matthewjumpsoffbuildings
Ah cool. Thanks for the tips.
Btw the wiki pages on the ReaScript API seem pretty undercooked in places, is there a better, more up to date resource?
|
Go to REAPER help menu -> ReaScript documentation (REAPER will auto-generate a ReaScript help/doc page)
|
|
|
03-03-2014, 09:12 AM
|
#7
|
Human being with feelings
Join Date: Mar 2013
Posts: 463
|
Cheers, why didnt I notice that
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:53 AM.
|