RPR GetUserFileNameForRead

From CockosWiki

(Difference between revisions)
Jump to: navigation, search
(GetUserFileNameForRead())
(Examples)
 
(One intermediate revision not shown)
Line 31: Line 31:
==Examples==
==Examples==
-
==C++==
+
===C++===
-
<pre>
+
<source lang=cpp>
-
</pre>
+
</source>
-
===Perl===
+
-
<pre>
+
 +
 +
===Perl===
 +
<source lang=perl>
# GetUserFileNameForRead.pl
# GetUserFileNameForRead.pl
#
#
Line 51: Line 52:
RPR_ShowConsoleMsg("$result, $filename");
RPR_ShowConsoleMsg("$result, $filename");
-
</pre>
+
</source>
 +
 
===Python===
===Python===
-
<pre>
+
<source lang=python>
-
</pre>
+
</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

TypeNameDescription
char*filenameThe default filename displayed by the dialogue box to the user.
const char*titleThe title of the Windows dialogue box.
const char*defextThe default file extension for the Windows dialogue box.

Returns

An array or list, the elements of which are:

TypeNameDescription
booleanresult1 if user pressed ok, 0 if user pressed cancel
char*filenameThe filename chosen by the user.
const char*titleThe title of the Windows dialogue box, this can be ignored.
const char*defextThe 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

Personal tools