• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum

Navigation

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

    Javascript Actor reading from Edit Text

    How To... ?
    3
    4
    857
    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.
    • S
      sebastian last edited by

      Hello,

      I'm using the javascript actor to read text. I want to use the split() function to separate the input by each line. However, the code is not detecting any '\n' characters even when I press enter a lot. Other split characters like '-' work fine. Is there a different character I need to use for the newline split?

      Thanks.

      mark_m 1 Reply Last reply Reply Quote 0
      • mark_m
        mark_m @sebastian last edited by

        @sebastian

        Might be worth having a read through this thread:
        https://community.troikatronix...

        HTH

        Mark in Brexshit land

        Intel NUC8i7HVK Hades Canyon VR Gaming NUC, i7-8809G w/ Radeon RX Vega M GH 4GB Graphics, 32GB RAM, 2 x NVMe SSD
        Gigabyte Aero 15 OLED XD. Intel Core i7-11800H, NVidia RTX3070, 32GB RAM 2 x NVMe SSD
        Homebrewed X99 Desktop, i7 5930, GeForce GTX980, 64GB RAM, Win10x64
        www.natalieinsideout.com

        1 Reply Last reply Reply Quote 2
        • Juriaan
          Juriaan Tech Staff last edited by

          Hi there @sebastian,


          Any reason why you prefer the JavaScript method then the Data Array way ? Personally I would go for the later.

          Like @mark_m already stated, please look at the thread mentioned, if you still have questions feel free to reply 

          Isadora 3.1.1, Dell XPS 17 9710, Windows 10
          Interactive Performance Designer, Freelance Artist, Scenographer, Lighting Designer, TroikaTronix Community moderator
          Always in for chatting about interaction in space / performance design. Drop me an email at hello@juriaan.me

          S 1 Reply Last reply Reply Quote 1
          • S
            sebastian @Juriaan last edited by sebastian

            @juriaan I am new to Isadora - I did not know about the data array. However, javascript suits me as each line has a separate output, so I am storing each line in an array.


            @mark_m Thanks - using '\r' worked.

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