Forum Replies Created
-
AuthorPosts
-
June 21, 2016 at 11:41 am in reply to: Is it possible to write something in a specific line in a uilistbox? #69465
ahh damnit, I already did that once in this Panel but thought, hey maybe theres an easier/better way. Thanks!
June 9, 2016 at 9:25 pm in reply to: [solved] How to get display the selected text of an uilistbox somewhere else? #69415Got it:
newwritetest=function(–[[ CtrlrModulator –]] modulator, –[[ number –]] value)textable={}
xvt=panel:getComponent(“RenameTxt2”):getProperty(“uiLabelText”)
xvn=panel:getListBox(“FactoryBank1”):getLastRowSelected()+1xv0=L(panel:getListBox(“FactoryBank1”):getTextForValue(0)) textable[1]=xv0
xv1=L(panel:getListBox(“FactoryBank1”):getTextForValue(1)) textable[2]=xv1
xv2=L(panel:getListBox(“FactoryBank1”):getTextForValue(2)) textable[3]=xv2
xv3=L(panel:getListBox(“FactoryBank1”):getTextForValue(3)) textable[4]=xv3
xv4=L(panel:getListBox(“FactoryBank1”):getTextForValue(4)) textable[5]=xv4
xv5=L(panel:getListBox(“FactoryBank1”):getTextForValue(5)) textable[6]=xv5
xv6=L(panel:getListBox(“FactoryBank1”):getTextForValue(6)) textable[7]=xv6
xv7=L(panel:getListBox(“FactoryBank1″):getTextForValue(7)) textable[8]=xv7textable[xvn]=xvt
TestDat=table.concat(textable,” “..”\n”,1,8)xvtest=console(tostring(TestDat))
panel:getComponent(“FactoryBank1old”):setPropertyString (“uiListBoxContent”,TestDat)
endoh I see you replied…have to read that
the MKS doesnt have any Tone or patchnames at all( I’m lucky I can skip that part :))but I thought it’ll be nice to have some reference in the Panel
the MKS also works with 8 Banks with 8 tones and patches each thats why I went for 8 first..June 9, 2016 at 7:42 pm in reply to: [solved] How to get display the selected text of an uilistbox somewhere else? #69410for the 2nd question I found a solution:
newwritetest=function(–[[ CtrlrModulator –]] modulator, –[[ number –]] value)xvx=L(panel:getListBox(“FactoryBank1”):getTextForValue(0))
xvy=L(panel:getListBox(“FactoryBank1”):getTextForValue(1))
xvz=L(panel:getListBox(“FactoryBank1″):getTextForValue(2))
xtext=tostring(xvx..”\n”..xvy..”\n”..xvz)
panel:getComponent(“FactoryBank1old”):setPropertyString (“uiListBoxContent”,xtext)
end
works, but IΒ΄m sure you have a better one π Still stuck with the first questionJune 9, 2016 at 6:27 pm in reply to: [solved] How to get display the selected text of an uilistbox somewhere else? #69408Thx so much Goodweather,
I tried to declare the Modulators in a called when the Panel has finished loading method but then I stumbled in the same Problems you had, tried the timer but still ist Buggy so for now I dropped it, if I see in your Panel how you managed that I’ll implement that as well π
While you are at the librarian manipulater – maybe you can help me again with something,again with the UiList Box. If I want to change the text from an UIListBox row (e.g. the one being clicked) with something I typed in a Ui Label what would be the Best way to do that? And is it possible to just Show 8 entries from an UiListBox that contains more then that?
Cant await your Panel and as well the new Manual, without you I think I had allready given up..- This reply was modified 7 years, 10 months ago by iceleben.
June 8, 2016 at 10:48 pm in reply to: [solved] How to get display the selected text of an uilistbox somewhere else? #69404Goodweather, youre the Scripting hero!
works fine:
BankItem_OnClick = function(–[[ CtrlrModulator –]] modulator, –[[ number –]] value)
xyz=L(panel:getListBox(“FactoryBank1”):getTextForValue(value))
panel:getComponent(“LCD10”):setPropertyString (“uiLabelText”,string.format(“%s”,xyz))
end
So if I understand correctly in the function line there is the reference for modulator with its value being made.
And then in the xyz…line the Modulator is ” panel:getListBox(“FactoryBank1″):” with the value being converted to the the Text…what exactly does the L stand for?
BtW Im doing a Panel for the MKS80 work in Progress file attached belowAttachments:
You must be logged in to view attached files.June 8, 2016 at 10:04 pm in reply to: [solved] How to get display the selected text of an uilistbox somewhere else? #69402Hi Goodweather,
thx again, I tried it with:
BankItem_OnClick=function(uiListBoxItemClicked,value)
panel:getComponent(“LCD10”):setPropertyString (“uiLabelText”,string.format(“%s”,value))
end
but then again I get the number displayed but not the text from the List boxBut finally after a lot of ” I am groot” moments I found a solution that works and might be interesting for userdata Problems
TextTestDisplay=function()
xu=panel:getModulatorByName(“FactoryBank1”):getModulatorValue()
lbDisk1 = panel:getListBox(“FactoryBank1″):getTextForValue(xu)
xyz=lbDisk1+”” –this little sucker converts userdata to a string
panel:getComponent(“LCD10”):setPropertyString (“uiLabelText”,string.format(“%s”,xyz))
endMy Brain hurts π
June 7, 2016 at 10:23 pm in reply to: [solved] How to get display the selected text of an uilistbox somewhere else? #69397What I’d like to do is – I already have an ui LCD Modulator that is showing some stuff
panel:getComponent(“ComScreen”):setPropertyString (“uiLabelText”,string.format(“%s %s %s %s %s %s”,lors,ramrom,bnkscreen,bnr,pot,ToneNbr))
and in the “pot variable” I’d like to show the clicked selected box text. At the moment with the above example I get the error “string expected got userdata”
June 7, 2016 at 9:05 pm in reply to: [solved] How to get display the selected text of an uilistbox somewhere else? #69395is there an easy way to convert the lbDisk1 Data from the above example to a string if I have the
panel:getComponent(βLCD10β³):setPropertyString (βuiLabelTextβ,lbDisk1) set to
panel:getComponent(βLCD10β³):setPropertyString (“uiLabelText”,string.format(“%s”,lbDisk1))June 7, 2016 at 7:51 pm in reply to: [solved] How to get display the selected text of an uilistbox somewhere else? #69386Hi Goodweather,
Ahhhh me stupid it I get it….iLastSelectedProgram is not a value by Default but one you defined
xu=panel:getModulatorByName(“FactoryBank1”):getModulatorValue()
lbDisk1 = panel:getListBox(“FactoryBank1”):getTextForValue(xu)panel:getComponent(“LCD10”):setPropertyString (“uiLabelText”,lbDisk1)
endworks fine
Thx so much Goodweather – Ctrlr is getting better Each day I work with it! But then I want to Change a lot of stuff I did before π
- This reply was modified 7 years, 10 months ago by iceleben.
- This reply was modified 7 years, 10 months ago by iceleben.
- This reply was modified 7 years, 10 months ago by iceleben.
- This reply was modified 7 years, 10 months ago by iceleben.
- This reply was modified 7 years, 10 months ago by iceleben.
- This reply was modified 7 years, 10 months ago by iceleben.
I have 2 Matrix with 1.16 but havnt tried the Ctrlr panel yet. Will do it on Sunday/Monday
Cheers,
MarkusIf anyone is interested here is the Lua script thats working. I used the global variable k1 which is part of a sysex string. Working fine:
function ConvertVal(value)
— Get switch Value
newVal = panel:getModulatorByName(“lowerupper”):getModulatorValue()
if newVal == 0 then
— set Globalvariable k1 to 2
panel:setGlobalVariable(1,2)
end
if newVal == 1 then
— set Globalvariable k1 to 1
panel:setGlobalVariable(1,1)
endend
Hi dasfaker,
could you please explain why you had to set the false,false,false argument in your function panel:getModulatorByName(“Filter”):setModulatorValue(midi:getByte(10), false,false,false)
Thx,
MarkusHi Goodweather “Master of the Sub37” :),
thx for making the step by step guide. Without it I would have been lost from the start.I’ll reread the pages.Is your panel available somewhere? It would be great to have it loaded while reading the guide -
AuthorPosts