Last updated:

ReaScript Video Tutorial — Part. 8: Using Native Actions

Now that you can code complex script on your own, the serie will now evolve in a “Quick Tip” format, easier to make, and easier to watch !

In this video, we learn

  • How to use native actions inside a script

As a bonus of this video, you wil llearn in this article how to run SWS actions from a script.

Let’s go !

Code Snippet:

-- RUN A NATIVE ACTION
-- Base on it's command ID.
reaper.Main_OnCommand(40289, 0) -- Unselect all items

-- RUN AN ACTION FROM A EXTENSION, LIKE SWS
-- You will need another function to do that.
reaper.Main_OnCommand(reaper.NamedCommandLookup("_SWS_SELTRKWITEM"), 0) -- Select only track with selected items

Next videos will show you how to use conditions to prevent error when setting new values to a REAPER object parameters.

Help us translate the subtitles of this video in your language using Amara.org !