Learning Hise scripting , my "Journey"

  • I thought I would just make one thread where I can ask questions about HISE scripting as I encounter them rather then flood the forum with questions. I am just doing some basic examples from the docs as it is.

    Question 1.

    I am doing the loading images example from the docs https://docs.hise.audio/scripting/scripting-in-hise/scriptpanel.html
    Sometimes things dont work as expected and I am unsure if something has changed with the HISE operates or what is up.

    Right now I am doing this and its throwing up an error Unknown function loadImage
    It will also not autofill the setPaintRoutine ?
    Also should setPaintRoutine and loadImage not have a different color ?

    Content.makeFrontInterface(600, 500);
    panel.loadImage("{PROJECT_FOLDER}Bkg Main New 2.png", "Background");
       g.drawImage("Background", [0, 0, 200, 200], 0, 0);
       g.drawImage("Background", [200, 0, 300, 200], 0, 0);

  • @lalalandsynth You haven't declared the panel

  • @ustk oops, that was obvious .. thanks
    Now it says , Image not found , is there a problem with having spaces in the filename ?

  • @lalalandsynth That's easy to figure out 🙂
    Although when you modify an image, don't forget to update the Image Pool

  • @ustk Yep , saw it ..:) Now it compiles but no pic shown , lol ....getting there .
    what do you mean by update the image pool ?
    I am assuming I can place it in the images folder and show it via that script ?

    EDIT: It works !

Log in to reply