Announcement

Collapse
No announcement yet.

VTW Scripting Predefined Functions or Library Scripts

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • VTW Scripting Predefined Functions or Library Scripts

    Hello,

    Does anyone have any documentation on Template Wizard Predefined Functions or Library Scripts, I am talking about the ones where you find the OnInit function, I have used one or two of those function/scripts but I have no idea how or when to use the other ones

    for example, I need to run a sub on a template when the user clicks on the save button, I have seen something of the sort in those functions/scripts but I do not know how is it used.

    I have gone through the manuals but there is only a brief mention of the functions/scripts but it doesn't go into detail as to how they are sued, in the window that contains the functions/scripts there is a bit of explanation as to what they do but not how/when to use them.

    If someone has any info please share it or some samples on how those functions/scripts are used.


    Thank you.

  • #2
    Hey Mat,

    The documentation it's totally absent, the only you have is the one that is displayed in Template Wizard itself.
    Also have in mind that the only way of learning this is by examples, which non exist online.
    I try to access the forum to learn this stuff, viz community looks the only way of learning so far.

    What you are trying to accomplish should be done with the predefined function Validate.

    This is what Template Wizard says about it :
    This function will be called by the UpdateHub Admin to validate the data entered into the template before saving. The function should return true if it is OK to save, false otherwise. It is recommended that it also displays messageboxes if there is an error in the validation, explaining to the user what the problem is.

    Beautiful explanation, right?

    This is an example :
    Code:
    function Validate
      If TWUniEdit1.UTF8Text = "" then
        msgbox "Please add some text to the Textbox"
        Validate = false
      Else
        Validate = true
      End If
    end function
    When in Pilot (Director) this function will be executed when the user press Save.
    If the function returns True, it will be saved, else, if it's false, it won't.

    Good luck!
    Pedro

    Comment


    • #3
      psugasti Pedro thank you for the response, everything you said is true about the documentation and the way to learn at least that's the best way for me to learn. I will give this a try and if you have any other examples please share and need to learn how to better use template wizard.

      Again Thank you

      Comment

      Working...
      X