• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    JavaScript Actor Output Assign

    How To... ?
    javascript javascript out
    5
    5
    1347
    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.
    • Salimelo
      Salimelo last edited by

      Hello Again, ran into another question: I need to individually address the different outputs in the JavaScript Actor. Here is the code: 

      function main()

      {

      var x = arguments[0];

      if (x >= 37 && x <= 39 )

      {return (1)} //output to first output

      if (x >= 41 && x <= 43 )

      {return (1)} //output to 2nd output

      }

      Any suggestions? Thanks a lot !

      MacBook Pro 13" 2015 ||| 2,7 GHz Intel Core i5 ||| 16 GB 1867 MHz DDR3 ||| 250GB SSD Hard Drive ||| Intel Iris Graphics 6100 1536 MB

      Michel jfg 2 Replies Last reply Reply Quote 0
      • Michel
        Michel Izzy Guru @Salimelo last edited by

        @salimelo

        Does this help: https://community.troikatronix... ?

        Best Michel

        Michel Weber | www.filmprojekt.ch | rMBP (2019) i9, 16gig, AMD 5500M 8 GB, OS X 10.15 | located in Winterthur Switzerland.

        1 Reply Last reply Reply Quote 0
        • m_theater
          m_theater last edited by m_theater

          @Salimelo if you just want to send one trigger to a dedicated output, this is not possible since the js output is an array by itself like the js input.

          but if it is just the sorting you care for it could be something like.

          function main()
          {     var x = arguments[0]; var o = [0,0]; if (x >= 37 && x <= 39 ){
              o[0]=1;
              } if (x >= 41 && x <= 43 ){
              o[1]=1;
              }
          print(o + " \n") // shows the value in the monitor
          return o
          }

          if you need a trigger you can use a comparator actor
          best m_theater

          js_trigger_mec.izz

          avk4.net

          1 Reply Last reply Reply Quote 1
          • jfg
            jfg @Salimelo last edited by

            @salimelo

            I think you have good reason t use Java but you can also get the same with trigger by usingInside Range actors

            best

            Jean-François

            • Izzy 3.2.6
            - MacBook Pro M1 Max 16" 64GB RAM, Mac OS 15.3.2 Sequoia
            - Mac Pro 5.1 middle 2012 (3,33 GHz 6-Core Intel Xeon, 32GB RAM, Radeon RX 580 8 GB ),
            Mac OS 10.14.6 (Mojave)
            - Mac mini Pro M4, Mac OS 15.3.2 Sequoia

            • A range of deployable older Macs
              Located in Bremen, Germany
            1 Reply Last reply Reply Quote 0
            • DusX
              DusX Tech Staff last edited by

              Just a quick add. I have tested with both using null and undefined in an attempt to have an output not trigger.
              In both cases Isadora is converting these into false (zero) values. 

              Troikatronix Technical Support

              • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
              • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
              • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

              Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post