HISE Logo Forum
    • Categories
    • Register
    • Login

    Execute .sh / bash script from HISE

    Scheduled Pinned Locked Moved Solved Scripting
    3 Posts 2 Posters 229 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • oskarshO
      oskarsh
      last edited by

      Is there a way we can call a terminal command from HISE directly? I tried creating a bash script then use the startAsProcess('') however I cannot get the output of the script. I can only get it to return 1 which is correct but would love to get the actual result.

      Calling a super simple one liner from HISE would be even cooler.

      I've created this snippet here which calls a bash script. You will need to populate the script yourself.

      HiseSnippet 802.3ocsU01aSCCD1tsYhVdQLI9A3u0TootVXLPBgXa8EVEzsJxXhuM443tXsD6HGmMhP7GlOw+.3bR1ZKqrMpDUpU8t64N+3mb2kIZEimjnzHb8ixh4H7ib7xjlfdATgDMpOB+DmwzDCWSJbsWVLMIg6iv3pu25.WuFJ+yOe2dzPpjwm4BgNVIX7OJhDlYdmryGDggCo97iDQygdqcFwTxdpPUJvmpNcPwT14zy3GPsvp3fvqMvWXTZOC0vSP3Z6o7y7BTWJKverHQbZH2ZzE4AEpv8PUnukwVundAhP+IWcuSPPUlLSEpVnBOyYrvWbs+YpwSyCPlkw75Atxhzq5Bzq6eidKgR34nTsBJstiGSKhMyhX4yCcFIgGNSofrOOUJvhp7CrSOEfPZZGQOmOTCFWmg61c5rAA9o0aZz.j9DCY2339TCk7VxPQH2KCdxG09LtIWB0ty4rDYKazITMbB8EZNCt9YtP8JJWAMfpUh1BN+1ZKjaSPkLsSBZZOeflIpPd6XsPZbKRrchgpM6lTdmca1rkE5laRxTojKgtHhjy8IFEgo4fnSLAv2hpRlBmAgJ8IwoFBmEnHM2mGFpH6OxaPShPRDl11hkDnzFF.BpCTXMgFGSlleigvWQc.0kvMaZpjYDJIQIOPY3GJca03aMp236MH+YnoSWZL6CDsJLDzykE1NTnusDckoQmx0aPtfFlxuFHzorX62Z2u1OVQ+wb.UxQRg4vXdo8sO+fJavf+84QVkx1+V5CvEy0FgkN397KfkAEcy0c5ySN2nhg0A2nUGFxT9ogTyhSd10MkA.8Xg1caKsLQXxlecz+v3Xmacb79Rw0clHLrfkywJKgifR8+fikKwdryfoSgIxYDrlyvurpartii+SpTiPd1XpQK9JB6bPZjGLJw3voKk7Pn3N3J1tkB6NVaqB3wk94F+B9TFrq0FWFr6UAQQTlVcBqXJvtl7A4d.NIyeCQc3UUfMoKJexXdcNB1ZeBisXotQhOeUS7EqZhaspI9xUMwsW0De0pl3qu6DsuTc2TiJpXrAgFOYP9pDLdfjBcf4cqneCeX0ci.
      

      HISE Developer for hire :)

      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        Background task perhaps - https://docs.hise.audio/scripting/scripting-api/backgroundtask/index.html#runprocess

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        oskarshO 1 Reply Last reply Reply Quote 1
        • oskarshO
          oskarsh @d.healey
          last edited by oskarsh

          @d-healey I knew that there was a function thought it was startAsProcess.

          Thanks alot, its just to damn hard to find anything in the docs.

          Here is a code snippet which gets the current selected Theme in MacOS.

          const var b = Engine.createBackgroundTask("GetDesktopTheme");
          
          b.runProcess('defaults', ['read', '-g', 'AppleInterfaceStyle'], function(thread, isFinished, data) {
          	Console.print(data);
          }); 
          

          HISE Developer for hire :)

          1 Reply Last reply Reply Quote 1
          • oskarshO oskarsh marked this topic as a question on
          • oskarshO oskarsh has marked this topic as solved on
          • First post
            Last post

          10

          Online

          1.7k

          Users

          11.8k

          Topics

          102.4k

          Posts