|
|
|
04-18-2018, 02:44 PM
|
#1
|
Human being with feelings
Join Date: Jul 2009
Posts: 429
|
Lil Help with a text input box
I am using gofer region scripts to create quick regions from time selection, with preset names for the arrangement sections I use. (intro, chorus, verse...)
So far has been great. However one feature I really would like is the ability to get user input for appending to the already set name.
For example. I hit the button to create a chorus. My structure goes from sections (A,B,C...) and occurrences in the song (1, 1', 2, 2'...).
Could I make a textbox appear when I call the script that asks me for the suffix manual input?
I.e: I hit the chorus button, so I input 1A' and I get "CHORUS 1A" as region name.
I am appending the script I am using now:
colorlist = [18894459, 24596520, 18633001, 18160236, 23541849]
listlength = len(colorlist)
colorindex = 0
TimeSel = RPR_GetSet_LoopTimeRange2(0, 0, 0, 0, 0, 0)
SelStart = TimeSel[3]
SelEnd = TimeSel[4]
HasState = RPR_HasExtState("Ruler", "Region_CustomColor")
if HasState == 1:
colorindex = int(RPR_GetExtState("Ruler", "Region_CustomColor"))
if colorindex > listlength - 1:
colorindex = 0
RPR_AddProjectMarker2(0, 1, SelStart, SelEnd, "CHORUS", -1, colorlist[colorindex])
colorindex += 1
RPR_SetExtState("Ruler", "Region_CustomColor", colorindex, 0)
RPR_UpdateTimeline()
|
|
|
04-18-2018, 02:58 PM
|
#2
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,970
|
RPR_GetUserInputs
|
|
|
04-18-2018, 03:23 PM
|
#3
|
Human being with feelings
Join Date: Jul 2009
Posts: 429
|
Thanks man. Any help on how could that be used as a suffix?
|
|
|
04-23-2018, 09:45 PM
|
#4
|
Human being with feelings
Join Date: Jul 2009
Posts: 429
|
Any words?
|
|
|
04-23-2018, 10:20 PM
|
#5
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,970
|
Replace this line:
Code:
RPR_AddProjectMarker2(0, 1, SelStart, SelEnd, "CHORUS", -1, colorlist[colorindex])
With this:
Code:
(retval, title, num_inputs, captions_csv, retvals_csv, retvals_csv_sz) = RPR_GetUserInputs("Title", 1, "Suffix", "", 512)
if retval:
RPR_AddProjectMarker2(0, 1, SelStart, SelEnd, "CHORUS " + retvals_csv, -1, colorlist[colorindex])
Last edited by cfillion; 04-23-2018 at 10:26 PM.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 04:35 PM.
|