Graphics

 View Only
  • 1.  Setting inputed text to 0 if null is in place

    Posted 05-14-2015 18:52
    I am completely new to xpression and don't have any experience using the script writer but I do have some experience in writing script. I have a text file that inputs data as it gets updated but before it gets updated it displays nothing. I wish to have the space display a 0 if nothing has been inputed yet. I have very little understanding of how the edit script events works so I would like to have that explained to me so that I can do what I mentioned above.


  • 2.  RE: Setting inputed text to 0 if null is in place

    Posted 05-15-2015 15:37
    On the text object itself:

    if text="" then

    text="0"

    end if


    #XPression


  • 3.  RE: Setting inputed text to 0 if null is in place

    Posted 05-15-2015 16:34
    I wrote the script, but didn't advise how to put it in. On the text object itself, right-click, and "Edit Script Events". Then, in the "OnSetText" tab (should be selected at start), enter the script above, and compile (click on the red lightning bolt, or hit F7, or choose "Script>Compile from the menu).

    Your script is now applied to run at OnSetText for that text object. You can apply different scripts to objects or scenes, or run them at different times in the sequencer (OnOnline, OnRender, OnPreviewRender, etc...).

    #XPression