Perl

From CockosWiki

(Difference between revisions)
Jump to: navigation, search
(Caveats)
Line 1: Line 1:
-
[[Reaper_Documentation|Reaper Documentation]]/[[ReaScript]]
+
[[Reaper_Documentation|Reaper Documentation]]/[[ReaScript]]/[[Perl|ReaPerl]]
=Introduction=
=Introduction=
ReaScript Perl uses the standard module FFI, but there's no need to include the line
ReaScript Perl uses the standard module FFI, but there's no need to include the line
Line 48: Line 48:
[[Category:ReaScript]]
[[Category:ReaScript]]
-
[[Reaper_Documentation|Reaper Documentation]]/[[ReaScript]]
+
[[Reaper_Documentation|Reaper Documentation]]/[[ReaScript]]/[[Perl|ReaPerl]]

Revision as of 22:50, 14 November 2009

Reaper Documentation/ReaScript/ReaPerl

Introduction

ReaScript Perl uses the standard module FFI, but there's no need to include the line

use FFI;

in your scripts because ReaScript will do that for you; it doesn't hurt if you do include that line.

Caveats

All REAPER API Calls Must Be On A Single Line

This is valid Perl

$return_value = RPR_ShowMessageBox(
  $msg_1,
  $title,
  MSG_BOX_YES_NO
);

But... It won't work under REAPER at the moment, all calls to the REAPER API have to be on a single line, like this.

$return_value = RPR_ShowMessageBox($msg_1,$title,MSG_BOX_YES_NO);

Example Scripts

These scripts are available for you to copy, use, add to and enjoy - but take care. The ReaScript API allows you to delete, edit and generally muck around with your REAPER projects. So take care when running a likely looking script; test it beforehand on a project that can get damaged without causing a problem.

Script NameDescriptionContributed by
API TestBasic Test of your ReaScript Installationschwa
Hello WorldA ReaPerl script that does somethingMikeLacey
Ez FreezeAnd one that that does something more...MikeLacey
Nudge Item VolumeChange the volume of an item in 1dB incrementssfzgeek
Rainbow ColoursCycle an item through the colours of the rainbowsfzgeek
Windows ClipBoard Demo CodeDemo of using the Windows Clipboard in a ReaPerl scriptsfzgeek


Reaper Documentation/ReaScript/ReaPerl

Personal tools