Turn off Universe button(s) with Pangoscript

Discussion in 'Lasershow Designer BEYOND' started by Ryan, Apr 22, 2020.

  1. Ryan

    Ryan New Member

    Ex.

    I have a toggle button selected in my Universe. I want to toggle a second button that activates and turns off the first button. How would I do this using Pangoscript?
     
  2. Igor Strakhov

    Igor Strakhov Staff Member

    Hi, Ryan!
    Try this one:

    OnClick:
    // put your code below
    Your_Universe_LayoutName.Your_Button1_Name.Selected=1
    Your_Universe_LayoutName.Your_Button1_Name.Value=0
    exit
     
  3. Ryan

    Ryan New Member

    Hello! I am not having any luck with this...says I have an error on the first line. I tried this for several buttons but it always shows an error. Clarification ~ is the button name the "Identifier" or the "Caption"? (tried both)

    OnClick:
    Ryan.HOME.Selected=1
    Ryan.HOME.Value=0
    exit
     
  4. Igor Strakhov

    Igor Strakhov Staff Member

    Hi, Ryan!
    You should use an Identifier (NOT a Caption).

    Do you see the following objects in the object tree?
    upload_2020-4-23_12-47-23.png
     
  5. Ryan

    Ryan New Member

    Hello Igor,

    Thank you for your timely responses ~ I figured it out.
    I was using the Identifier. However, it turns out my error was due to the name of my Universe. It looks like it uses the filename instead of what I have it named currently in the Universe tab. Initially, my Universe was named "Ryan's Universe" and upon receiving your initial instruction I simplified it to "Ryan"...it wasn't until I checked the object tree that I notice the original Universe name/filename was being used (Ryan's Universe).
     
  6. Igor Strakhov

    Igor Strakhov Staff Member

    I was happy to help you! You're welcome!