RPR GetProjectPathEx
From CockosWiki
(→Examples) |
(→C++) |
||
Line 17: | Line 17: | ||
==Examples== | ==Examples== | ||
===C++=== | ===C++=== | ||
- | <source lang=cpp> | + | <source lang=cpp highlight=11> |
+ | void AddRelatedProject(COMMAND_T* = NULL) | ||
+ | { | ||
+ | // TODO fix | ||
+ | if (g_relatedProjects.Get()->GetSize() >= 5) | ||
+ | { | ||
+ | MessageBox(g_hwndParent, "Too many related projects.", "SWS Add Related Project", MB_OK); | ||
+ | return; | ||
+ | } | ||
+ | |||
+ | char cPath[256]; | ||
+ | GetProjectPath(cPath, 256); | ||
+ | |||
+ | char* filename = BrowseForFiles("Select related project", cPath, NULL, false, "Reaper Project (*.RPP)\0*.RPP"); | ||
+ | if (filename) | ||
+ | { | ||
+ | g_relatedProjects.Get()->Add(new WDL_String(filename)); | ||
+ | free(filename); | ||
+ | } | ||
+ | } | ||
</source> | </source> | ||
+ | |||
===Perl=== | ===Perl=== | ||
<source lang=perl> | <source lang=perl> |
Latest revision as of 22:27, 11 February 2010
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR GetProjectPathEx
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetProjectPathEx
Contents |
GetProjectPathEx()
void GetProjectPath(char* buf, int bufsz) deprecated
void GetProjectPathEx(void* proj, char* buf, int bufsz)
GetProjectPath() and GetProjectPathEx() can be used to query the path that media files are stored in for the current project.
Parameters
void* proj, char* buf, int bufsz
Returns
An array, containing void* proj, char* buf, int bufsz
Examples
C++
void AddRelatedProject(COMMAND_T* = NULL) { // TODO fix if (g_relatedProjects.Get()->GetSize() >= 5) { MessageBox(g_hwndParent, "Too many related projects.", "SWS Add Related Project", MB_OK); return; } char cPath[256]; GetProjectPath(cPath, 256); char* filename = BrowseForFiles("Select related project", cPath, NULL, false, "Reaper Project (*.RPP)\0*.RPP"); if (filename) { g_relatedProjects.Get()->Add(new WDL_String(filename)); free(filename); } }
Perl
Python
See Also
project: GetItemProjectContext, GetProjectPath, GetProjectPathEx, GetProjectTimeSignature, GetProjectTimeSignature2, Main_openProject, SelectProjectInstance, SetProjectMarker, SetProjectMarker2, UpdateItemInProject, plugin_getImportableProjectFilterList, projectconfig_var_addr, projectconfig_var_getoffs, AddProjectMarker, DeleteProjectMarker, EnumProjectMarkers, EnumProjectMarkers2, EnumProjects,
(Section automatically generated, edits may be overwritten.)
Stuff
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR GetProjectPathEx
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetProjectPathEx