RPR CountSelectedMediaItems
From CockosWiki
(→Examples) |
|||
(12 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
{{API_Doc_Header}} | {{API_Doc_Header}} | ||
- | = = | + | =CountSelectedMediaItems()= |
+ | int CountSelectedMediaItems(ReaProject* proj) | ||
+ | |||
+ | Counts and returns the number of selected items in the specified project. | ||
==Parameters== | ==Parameters== | ||
+ | {| class="wikitable" | ||
+ | !Parameter type!!Name!!Description | ||
+ | |- | ||
+ | |ReaProj*||proj||Project index, 0 for the active project | ||
+ | |} | ||
+ | |||
==Returns== | ==Returns== | ||
+ | Returns a scalar value. | ||
+ | {| class="wikitable" | ||
+ | !Type!!Description | ||
+ | |- | ||
+ | |integer||The number of selected items in the project. | ||
+ | |} | ||
==Examples== | ==Examples== | ||
+ | ===C++=== | ||
+ | <source lang=cpp> | ||
+ | </source> | ||
===Perl=== | ===Perl=== | ||
- | < | + | <source lang=cpp> |
- | </ | + | # |
+ | # CountSelectedMediaItems.pl | ||
+ | # | ||
+ | |||
+ | use strict; | ||
+ | use warnings; | ||
+ | |||
+ | my $selected_media_items = RPR_CountSelectedMediaItems(0); | ||
+ | |||
+ | RPR_ShowConsoleMsg("There are $selected_media_items selected media items in the current project"); | ||
+ | </source> | ||
===Python=== | ===Python=== | ||
- | < | + | <source lang=cpp> |
- | </ | + | # |
+ | # CountSelectedMediaItems.py | ||
+ | # | ||
+ | |||
+ | selected_media_items = RPR_CountSelectedMediaItems(0); | ||
+ | RPR_ShowConsoleMsg("There are "+str(selected_media_items)+" selected media items in the current project"); | ||
+ | </source> | ||
+ | |||
==See Also== | ==See Also== | ||
+ | {{SeeAlso_item}} | ||
+ | |||
+ | ''(Section automatically generated, edits may be overwritten.)'' | ||
+ | |||
==Stuff== | ==Stuff== | ||
{{API_Doc_Footer}} | {{API_Doc_Footer}} | ||
Line 16: | Line 55: | ||
[[Category:ReaScript]] | [[Category:ReaScript]] | ||
[[Category:Perl]] | [[Category:Perl]] | ||
+ | [[Category:ReaPerl]] | ||
+ | [[Category:ReaPython]] | ||
[[Category:Python]] | [[Category:Python]] |
Latest revision as of 11:35, 28 January 2010
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR CountSelectedMediaItems
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR CountSelectedMediaItems
Contents |
CountSelectedMediaItems()
int CountSelectedMediaItems(ReaProject* proj)
Counts and returns the number of selected items in the specified project.
Parameters
Parameter type | Name | Description |
---|---|---|
ReaProj* | proj | Project index, 0 for the active project |
Returns
Returns a scalar value.
Type | Description |
---|---|
integer | The number of selected items in the project. |
Examples
C++
Perl
# # CountSelectedMediaItems.pl # use strict; use warnings; my $selected_media_items = RPR_CountSelectedMediaItems(0); RPR_ShowConsoleMsg("There are $selected_media_items selected media items in the current project");
Python
# # CountSelectedMediaItems.py # selected_media_items = RPR_CountSelectedMediaItems(0); RPR_ShowConsoleMsg("There are "+str(selected_media_items)+" selected media items in the current project");
See Also
item: AddMediaItemToTrack, AddTakeToMediaItem, GetTrackMediaItem, GetTrackNumMediaItems, CountMediaItems, CountSelectedMediaItems, GetItemProjectContext, SetMediaItemInfo_Value, CountTrackMediaItems, SetMediaItemTakeInfo_Value, GetMediaItem, GetMediaItem_Track, GetMediaItemInfo_Value, GetMediaItemNumTakes, GetMediaItemTake, GetMediaItemTake_Item, GetMediaItemTake_Source, GetMediaItemTake_Track, GetMediaItemTakeInfo_Value, SplitMediaItem, MoveMediaItemToTrack, GetSelectedMediaItem, DeleteTrackMediaItem, GetSetItemState, GetSetMediaItemTakeInfo_String, Undo_OnStateChange_Item, UpdateItemInProject,
(Section automatically generated, edits may be overwritten.)
Stuff
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR CountSelectedMediaItems
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR CountSelectedMediaItems