Old 12-06-2019, 11:48 AM   #1
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,947
Default REQ: Script to insert marker with specific name

Hey everyone,
Is there a script that can insert marker with specific name? (Obviously the user would have to set this name first.)

"Insert Named Marker", perhaps?


Cheers!
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 12-06-2019, 01:27 PM   #2
Yanick
Human being with feelings
 
Yanick's Avatar
 
Join Date: May 2018
Location: Moscow, Russia
Posts: 124
Default

Hi! In quotes where "Username" enter your name
In the second field (color) you can change the color - reaper.ColorToNative("Red number", "Green number", "Blue number")
By default there is red

Code:
reaper.Undo_BeginBlock()

local name = "Username"
local color = reaper.ColorToNative(180,60,50)|0x1000000

local _, num_markers, _ = reaper.CountProjectMarkers(0)
local cursor_pos = reaper.GetCursorPosition()


reaper.AddProjectMarker2(0, 0, cursor_pos, 0, name, num_markers+1, color)


reaper.Undo_EndBlock("Insert marker", -1)
__________________
My scripts for rendering

Last edited by Yanick; 12-06-2019 at 01:40 PM.
Yanick is offline   Reply With Quote
Old 12-06-2019, 05:00 PM   #3
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,947
Default

Yanick! Thank you so much for this script! And so quick, too!
I really appreciate your work on this. I'll test it out tomorrow with the SWS marker actions to turn metronome on and off using markers (!41745 and !41746).

Thank you!
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 12-07-2019, 05:02 AM   #4
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,947
Default

Works great, Yanick, thank you so much!!


I should mention for those who aren't aware, this is a LUA script, so needs to have .LUA extension.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:07 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.