First pl

From CockosWiki

Jump to: navigation, search

This is the REAPER equivalent of Hello world!, it presses the Play button for you

#
# First.pl
#
 
# simulate pressing the play button in the current project
RPR_Main_OnCommand(1007,0);

It does just the one thing, calls the REAPER API function RPR_Main_OnCommand() with the value 1007 -- which means Play.

There's very little to it, just the one line calling the API function, doesn't even look much like Perl really.