RPR GetUserFileNameForRead
From CockosWiki
(Difference between revisions)
(→GetUserFileNameForRead()) |
(→Examples) |
||
(One intermediate revision not shown) | |||
Line 31: | Line 31: | ||
==Examples== | ==Examples== | ||
- | ==C++== | + | ===C++=== |
- | < | + | <source lang=cpp> |
- | </ | + | </source> |
- | + | ||
- | + | ||
+ | |||
+ | ===Perl=== | ||
+ | <source lang=perl> | ||
# GetUserFileNameForRead.pl | # GetUserFileNameForRead.pl | ||
# | # | ||
Line 51: | Line 52: | ||
RPR_ShowConsoleMsg("$result, $filename"); | RPR_ShowConsoleMsg("$result, $filename"); | ||
- | </ | + | </source> |
+ | |||
===Python=== | ===Python=== | ||
- | < | + | <source lang=python> |
- | </ | + | </source> |
==See Also== | ==See Also== |
Latest revision as of 09:55, 29 January 2010
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