[ANSWERED] How to start an external program from Javascript actor ?


  • The titel says already all. I have tried following

    var SyR = Application('Syphon Recorder');

    SyR.activate();

     but I got this message:

    Javascript Error Line 1: ReferenceError: Application is not defined

    what is missing? the same code works in automator

    thanks

    Jean-François

  • Tech Staff

    @jfg said:

    activate();

     Javascript is run via the V8 engine, and doesn't have access to any Web/Dom elements.
    That said, I don't think activate() is a Javascript function that allows what you expect. 
    I did a search and can't find any reference to it.
    Either-way, this feature is not supported in the V8 engine.


  • @dusx

    Thank you. any other solution?

    Jean-François


  • @jfg Apple script is what i use


  • @gapworks

    but how do you use applescript in Isadora without an external application?


  • @jfg

    Hi,

    I have made an FFGL plugin with Vuo that allows launching apps from Isadora. It is created as an FFGL plugin because it is the only way to export it from Vuo. No need to connect to projector or image dimensions. Another way to launch applescript is through OSCulator (you send an osc message from Isadora and route it to applescript with OSCulator). Another option would be Bome MIDI Translator.

    Best

    Javi

    AppLauncher.bundle.zip


  • @jandraka said:

    Thank you very much

     


  • @jfg

    Just so you all know: I've been hestitant to allow actors in Isadora that could allow a patch to do damage to your system, i.e., erase your hard drive. That's why I've avoided things like allowing AppleScript or applications to be launched. To me it feels like a security risk to allow such things. But I am happy to see that the Isadora community always seems to find a way. ;-)

    Best Wishes,
    Mark