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GSEPlvlUSazJqwcyZroj1yA5ES.5URAZxodELqXklVPCjuUGjFCsEPJB4F56QqsFRlI0fF0i6CyLNDTzrTDdBoKqeHAhwjY3K1R2RmehV7RKyRgfk+GJxRW8idbSaO+SZK7eDXOu2v92+.uAIEaeRNpNDZOf9aZgUsrIP1.rJf2rLgIaotc03CudFJRf6F6gEyW4frbozAf7OycEs7ZX.sho5kSctTNwYEtWypOU3Ldw3szBvqL204LdSKNql0NCGRbDy.6JV69ym+UhoCkuJAJW2ZfHjf8orQCv9AvEPJ7T0JsWy+IpWN3LWuLDV5wwtyex8c1siA9Jbdo+osZodjOOlM2Zkh78IADr.b+Z1bI682+wg73fSZ06en5vxAgvk7.UnOvdLBv6B88XmPdTzPX6nlqH8g5GGNRxUyjrOYBILZdYOK1WVNBi3IuV1zDD87HhzWSc5gEgzi00VsJMNHIz8VVs1b84+lrG7ug2V17a6n5mXRyhaRqhaxcKtIaVbS1p3lbuhax8KjIIGz5gCjQLxG2ch5st3YqdKXB5igiBZZ1lNJexSjLepWMUyOKpft1SIWvCwtvm0uS7S28PkOav8i7T1JYXb.U5p1gMAxcARjX75P4eCwwdhLoymGsGmwCFyYTm4yT.Q9iFQB0w9B2PORHfDUyjbC68IdDbjVptu19ov6yvgym.rPbQyyNWrL+0WZk.WjL4O5+F0OT9+80OrLp6JoUOffUOT7Yte9xVpT+HY4I+aA084wPk6ixt52BpOX.TSjCQuJgRxJOR52P1WBnADlqpyeAeoC1LqjB4fMyFzvIapf8VZa0iY0eKPIOnXEO8izQPkWRHAWu8IAk9XmP9KbRd+uDqWRIAPIS8anVwpmrOJ+g+R10Gto5ENNxvf0.9cwVzpvVb2BawlE1hsJrE2qvVb+Baw2rDKjkE7nXA2OIoHHn+NIGjL2Q6Qk+MbZyIIH
-
@Jay I didn't explain very clearly. Whenever you see something like
Control.
you have to replaceControl
with the control you are using. So in your case it would beComboBox1.changed();
. You can also typechanged
into the API browser in HISE to see what controls the function can be used with. -
@d-healey is giving me some error, but is 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joPcf9A7ZqgUoTQr3th.XkIQvDsJESNl1g2KhBAZpT8eXacKS9Id9asJYEF19e7CYqq9dutYbl+YiM9OCcl1a37Guk2flgsOJWUG.e2m86FgUsbnP1.hNf2pLkq9RWlE810ogtEDdI9D4zsPn5aJa.HAzT0pU0iAzJGaFGelzWwxB2qX2iIcGMe7VZN3Uk65LFuYcoUyduACntxIfcE68+ky9VxLgxWkBkqZ2WFQIAL9v9jfPnFjFOUsyjZ9uQiygKciyPXouf3M8M2W6zNA3qno09WN5s5tAhD9T6UFxOfFRIRv8aXyEbN3f6EIRBm0p2bG8kkCifJ8.UXNvi3Tf2klmwchDwwCfiidshMGpWRzPEWMQyAzioQwSq6gIApdR3TeUYYKKP0iioJeMysKQFwNwb15cowgogtvqIzxMmQt0Lx2bF4MmQdqYj2dF4aMQNkP6RBU2LTulYl9JN+x0WAr.8HvQ1XlsYCKV7TMlWfKnYMTLdtzbdrw49r9sPe7RwVd4f6644ZUxwXelx6rG+XHrDznv3UgNaFPR7k4ZmNEQWAWDNRvYtSGD.WpGNjFYh84dftqTBwfSzbMmCn9TRrQT7W67.3EHjnois+f3hlKOWrH+0WZmBWrJuF9+FkFK++9RiKh5tTVgQLr6QxOy8yWzVmJGqp79oBpGHRflRGlWUyFJ80GJ26RMK.VRUTMUtgRVAn9TtmV3ugeYC1LuZoZvl4ChbyWJ3rk8s9cZls4VxGpC6adkNFZpPAInh1GETFPbiDO0M8osJrdAsF.kb8+mvJ1cUx3h2zZa2X8Fn.nV0SccUABqAL77so0ovladJrYySgMacJrY6SgM25TXy2sPaTsIb2DoHHMIInn2doWrr1y38S+CbIVLDN
Using the snippet here (same as Jay ) how do I loop through the list of items where when it meets the end of the list it loops back to the beginning ?
I was reading the docs ( https://docs.hise.audio/scripting/scripting-api/array/index.html ) this morning trying to get an understanding but Im still quite new to scripting.
Any help is appreciated.
-
@Dalart said in ComboBox - prev/next:
HiseSnippet 1472.3oc4X0siSbCE1SxN.Ikf.DWzapjEpUJqJ6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7CYqq9dutYbl+YiM9OCcl1a37Guk2flgsOJWUG.e2m86FgUsbnP1.hNf2pLkq9RWlE810ogtEDdI9D4zsPn5aJa.HAzT0pU0iAzJGaFGelzWwxB2qX2iIcGMe7VZN3Uk65LFuYcoUyduACntxIfcE68+ky9VxLgxWkBkqZ2WFQIAL9v9jfPnFjFOUsyjZ9uQiygKciyPXouf3M8M2W6zNA3qno09WN5s5tAhD9T6UFxOfFRIRv8aXyEbN3f6EIRBm0p2bG8kkCifJ8.UXNvi3Tf2klmwchDwwCfiidshMGpWRzPEWMQyAzioQwSq6gIApdR3TeUYYKKP0iioJeMysKQFwNwb15cowgogtvqIzxMmQt0Lx2bF4MmQdqYj2dF4aMQNkP6RBU2LTulYl9JN+x0WAr.8HvQ1XlsYCKV7TMlWfKnYMTLdtzbdrw49r9sPe7RwVd4f6644ZUxwXelx6rG+XHrDznv3UgNaFPR7k4ZmNEQWAWDNRvYtSGD.WpGNjFYh84dftqTBwfSzbMmCn9TRrQT7W67.3EHjnois+f3hlKOWrH+0WZmBWrJuF9+FkFK++9RiKh5tTVgQLr6QxOy8yWzVmJGqp79oBpGHRflRGlWUyFJ80GJ26RMK.VRUTMUtgRVAn9TtmV3ugeYC1LuZoZvl4ChbyWJ3rk8s9cZls4VxGpC6adkNFZpPAInh1GETFPbiDO0M8osJrdAsF.kb8+mvJ1cUx3h2zZa2X8Fn.nV0SccUABqAL77so0ovladJrYySgMacJrY6SgM25TXy2sPaTsIb2DoHHMIInn2doWrr1y38S+CbIVLDN
Using the snippet here (same as Jay ) how do I loop through the list of items where when it meets the end of the list it loops back to the beginning ?
I was reading the docs ( https://docs.hise.audio/scripting/scripting-api/array/index.html ) this morning trying to get an understanding but Im still quite new to scripting.
Any help is appreciated.
You'll need to know how many items in your combo box and then use your script to test to see if you're on the last item
-
Well in this snippet the item count would be 5 and the Docs would lead me to believe that I'd use this formula:
for (i = 1; i < 5; i++)I just have no clue how I'd script this to check anything, an example would be most helpful.
-
Check the
%
(modulo) operator, it is commonly used to wrap values around a upper limit.wrappedI = (i + 1) % 5;
-
@Dalart said in ComboBox - prev/next:
Well in this snippet the item count would be 5 and the Docs would lead me to believe that I'd use this formula:
for (i = 1; i < 5; i++)I just have no clue how I'd script this to check anything, an example would be most helpful.
HiseSnippet 1507.3oc4X8taSbDDeOmb.1Ei.DeneoRqPsRNpDhsS.pTIvgyentfAq3.pR8Cn02s1dE2s6061KDWDU7nzGg9HviDuAsyd+y6YLFG2lTTqyWtY14O+1Y1clYS2.gMMLTDfLJe3XeJx3hl8Fyki1YDgwQs2EYbIyNjPIM.mvp0XeRXH0AYXrxCULLJuJJ926ueKhKgaSmvBgdtfYSeLyiImvsq0iXtt6SbnGx7zjdKq11B9NBWQDfmULqi7I1ujLj9DhRrRlHiysmCSJB5IIRZHxX0VBmw8FIdEOQ9myBY8coJhFndfgRXuuv0QgXEWzNiXtNcy12gHjgY2IQgURhBWyrCygkyeRz3xwKfmngd7vnz7fWCc3UewgmgF7VMAdWwrmc.yWNYEE19By1bHQMf.o.cXkHKpz5qZti.jfKuoG4kz8C.hbMpc650uA9V0qu12Wsh5OHUDJwGQfDuvqunk33F3swYFXHUBr8Ebfn10yk35YZWsxFa3GPOpZEF2kwo3AQbaISvwBdqHoTvanLUfvslclctA3M2H5ZUq7Zb0JX3Ga.tVLO71aiarVBS0ubX0Wb7ySDXBLUfKlYMEZRsCtVQ4u21MWCCtorZ8IpFloZQoWugxTSIq8HBeH0Ydd4ty2Ia8Ir5ahilyNlmFEu9ZJykFK2g351GtyTa5fbRZYiM3zike7TRy4kRNCxH0OAYjucIyH2ay45jF+syHMmeFoYgLR0JZIgmHjzmxqsVkWWobk2TAO8RCFLy0RMnKMXlKqpwFLOEqwi75SCxR0YBBEaJVMy7iWMSuXqcRrQSPAuMmIepOk+wpwgRCnP0tRonBDUFWq6xo05xxGHlipTWd5AECanKx4xa5LsIplZhGS5Sci0+BlwemqriI.WrTfUEFwxQTb+3rENI2GygIodgXFOj4jvHCB2.SbC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