Execute .sh / bash script from HISE
-
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.
-
Background task perhaps - https://docs.hise.audio/scripting/scripting-api/backgroundtask/index.html#runprocess
-
@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); });
-
-