Loop Array and Filter by String Prefix.
-
Im really trying to learn on my own but most of this stuff comes from you guys.
I learned ".length" from you guys but thats not even in the api's lol.
Where does that come from and what else is there where that comes from? lol
-
@Chazrox do you just mean content.getAllComponents("KICK");
this would get any component starting with KICK, best if you have names like KICK0, KICK1, KICK2 etc
and you can do an array like const var kicks = [KICK0, KICK1, KICK2, KICK3];
But maybe this isn't what you meant?
-
@rglides ah yeah me again not fully reading questions :D this doesn't directly help the combobox issue
-
@rglides haha all good brotha. Thank you! Im over here wrecking my brain. I've been at this one thing for 11 hours now. You know I thought I was smart until I came here hahahaha Bless! I love a good challenge but some things just need help and const var things = ME; //lol
-
@Chazrox Start here https://docs.hise.dev/scripting/scripting-in-hise/javascript.html
@Chazrox said in Loop Array and Filter by String Prefix.:
startOffset, stypeStrictness. I dont know what that is and I dont see it in the documentation
You want String.indexOf rather than Array.indexOf - https://www.w3schools.com/jsref/jsref_indexof.asp
HISE Script is based on JavaScript so when it comes to basic functions you can often find the info you need by looking up the JavaScript equivalent.
My scripting 101 video might also be useful for you if you haven't seen it already.
-
@Chazrox haha I know the feeling!
this should work
HiseSnippet 1771.3oc0XssaabCDcWauo1pwAIA4g1GZAgPQfDbriTtVTamHKY4.AeQpVxFAvMHfdWJIVuhbwtT9RCLP+E5uQepeB8SJ+AsC2qb0kDEUG2V8jFxY3blyPxY31vkaR773tZ5Kz5BGhl9MMZdASzsRWLkoUaSM86afwUpua45kq+5xGzpU88ZVdiJauW0W2p9AsZbPqpGVcuVZkuvA64Qrzz0m8URa0WXNM+eu+kkw1XlIIYHMsC4TSxNzdTQxnMJsM01dKrEoEsmh1OoTMSNqB2l2Gv4rFEzbvlmf6P1CKUaFCM8aT0hJ3tMEXAwSSetxbqKZ1keFKP+CodzisIRghZMgEJX3s31VRDKGUqRWpsUiH9vSSS2nQB6La.6bOicoVz3wSXoa6OAJwBU9Pelzva1TvqnJ7Jn.uQ.IcEHMW.jtiQSSWpiHYFId9RiZLAwsMFncUnDnq1L+17FU3fF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f8pAosX.u0P.dRAg7vlBHJQtRAwvcZC83ys5aiEoa7W9ZmvIf84o51V1QMyiJtP80PWYuFXRg3cLZPElcGMFmYDXD1I+4.igugZQipsaC2nk.v4L150eddvjp6+l.2eWilBWBtGk0IrUGeLjwH5gBWEOk0YheJKrczuWD5unn1eVpbefibSO5eTx2Uazi2mkxWgHeehCAKfzrhMyWZ+8ekKuuyfV89W5uonkKbRFnB0IpyH.WKTiwJtbOu1P33uVdpS0nuaGIWkLx9jSItdoGau98f7MiA8iKOgIu57.OhL+RM2EKbomqpsuWJzB6mig226KWb.4GMf7iGP9ICH+zAje1.xOOQNoU6Mk6WUt3bnpTewjUkBVqFXH5UzrLsSreBFQ86QDy39nR4aYLhuJvM9b8gJlaxN28g+NJ+O3lzTeWkEhvXSpL6TkcJbBEFQhw6B0uai6aKhFM8sE6xYbmtbF0L84AX+cmNDWUrOx.ZCgPVXMdj6UZen4OrmxA5uqzNPCkX2zGy+j3hhexeioQlu9Ji.3hjWwg9mj2tV2l8AqFN6DUM7JGuSekwqUp6Vg0HQf2cE+GOOeSC+a0Qxhv+aA0848EPw0nBbFPUvlPkeShZsPYe2gxEjxR.0jvr7E9K3W3jEiJbJmrXzjZlQKEDag+2+0H5yRXxRG9M4YCkjsU2R6A8WHgDTr6ZAk8vlt72ZF7VKIVm2eD.kL+Oh+BF6JkQIOuJFp8f5Uu0zL8RMjgOZZM7wSqgOYZM7oSqgOaZM74Sqge+G2PY6DazWv6EbYpl1tMpFrATuZ7FvY09aCKtTjB
-
@d-healey Thanks. I'm still sitting here trying. I've watched that video like 4 times in full and taken extensive notes but its just gonna take repetition to retain everything. It is alot. Loops are next level for me. I've figured out alot considering I have zero coding background and I've managed to finish a few plugins in my first month. This is considered advanced for me at the moment but i'll get it. I appreciate the help always! Im never asking for handouts!
see...there's ".length" in my OWN notes but I forgot I even wrote that. lol
-
@rglides part of me doesn't want to open this.....but I have to. LOL Im just trying to understand the logic. Thank You!
-
@Chazrox ha yeah it is really important to really learn it all, but snippets can help to learn, they can also soothe a headache sometimes lol
-
@rglides 100% !