FANDOM


Advanced Authoring - LabTALK LabTALK is an internal scripting language that is used to create smart components, smart templates, macros or various script effects.

An example of LabTALK usage could be the keypad component in Plug-ins, Components tab:


After you drag the component to Connection window its script will run and display an input dialog. After pressing "OK", the script will create all the necessary objects and links depending on the selection. This is example of a smart component that uses LabTALK script.

It is not necessary to learn labTALK for any DVD related problems. LabTALK has nothing to do with the DVD itself, it is rather a scriptual access to the DVD-lab functions and commands.

If you are DVD author and don't have the direct need for scripting in DVD-lab then there is nothing to gain for you. You can simply skip all the LabTALK part.

Lab-TALK

Lab-TALK is a BASIC type of language and it is a pure interpreter. That means it will not detect error until the execution of the program reaches the erroneous line.

LabTalk can be accessed from the lab-TALK menu - Open Script Editor:


The top part of the window is the editor, while on the bottom part there is output window with Output tab and Functions definition.

When you write a script you can press Run button


And the script will start. In the output window you will see errors, print or trace commands.

Usage of LabTALK scripts

When you save a LabTALK script *.talk it will appear under the tab Plug-ins, Script in Assets.


Double-clicking on the script will open it back in the LabTALK editor. The script assumes that it can be directly run by drag-and-dropping it from the Assets Plug-ins to the appropriate window (for example, a menu).

You can examine some of the default scripts by reading their source code.

Example: Open menu and type Text in it:


Now open Plug-ins in the Assets window, then click Script tab and drag Flip Horizontal script over to the Text in menu


The script will be directly applied to the object


Now double click on the Flip Horizontal script to open it in the editor window and examine it.

The script will show essentially something like this (comment lines are not reproduced here)

menu = MenuGetCurSel()
MenuActivate(menu)
object=
ObjectGetCurSel(menu)
if (object==0) then
   
print "No object Selected"
   
end
endif
ImgGrabObject(1,menu,object)
imgW =
ImgGetWidth(1)
imgH =
ImgGetHeight(1)
ImgCreate(2,imgW,imgH)
trace "W =",imgW, " H=",imgH
ProgressBar(0,imgW,"Flipping!")
for x=1 to imgW
   
ProgressSetPos(x)
   
ImgCopyCol(1,x,2,imgW-x+1)
next x
ImgSetToObject(2,menu,object)

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.