Graphics

 View Only
  • 1.  Script based on containing text

    Posted 11-17-2014 18:24
    Hello there,

    I'm sure this answer is on the forums somewhere, but I haven't been able to find it.

    What is the script for checking to see if a text field contains a certain word? For example, I'm trying to add this script on the text object itself, on the "on set text" tab:



    if this text contains "xyz" then

    run this command

    else

    run a different command


    I appreciate the help, thanks!


  • 2.  RE: Script based on containing text

    Posted 11-17-2014 18:50
    Run in "OnSetText" for a text object.

    dim quad as xpBaseObject

    scene.getobjectbyname("Quad1", quad)

    if text.contains("Off") then

    quad.visible = false

    end if

    #XPression


  • 3.  RE: Script based on containing text

    Posted 11-18-2014 02:11
    Perfect, thanks!

    #XPression