RPR GetUserFileNameForRead
From CockosWiki
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR GetUserFileNameForRead
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetUserFileNameForRead
Contents |
GetUserFileNameForRead()
bool GetUserFileNameForRead(char* filename, const char* title, const char* defext)
Displays a standard Windows Open File dialogue box allowing the user to choose an existing file. It returns results in an array, documented below.
Parameters
Type | Name | Description |
---|---|---|
char* | filename | The default filename displayed by the dialogue box to the user. |
const char* | title | The title of the Windows dialogue box. |
const char* | defext | The default file extension for the Windows dialogue box. |
Returns
An array or list, the elements of which are:
Type | Name | Description |
---|---|---|
boolean | result | 1 if user pressed ok, 0 if user pressed cancel |
char* | filename | The filename chosen by the user. |
const char* | title | The title of the Windows dialogue box, this can be ignored. |
const char* | defext | The default file extension for the Windows dialogue box, this can be ignored. |
Examples
C++
Perl
# GetUserFileNameForRead.pl # use strict; use warnings; my ($result, $filename, $title, $defext); $title = "Go Mad, Choose a file..."; $defext = '*'; ($result, $filename, undef, undef) = RPR_GetUserFileNameForRead($filename, $title, $defext); RPR_ShowConsoleMsg("$result, $filename");
Python
See Also
Stuff
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR GetUserFileNameForRead
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetUserFileNameForRead