Database driven scripts
| October 24, 2008 | Posted by The Futtock under Other Stuff |
Comments off
|
I am currently working on a Scala InfoChannel project where the entire script needs to be database driven so clients can log into an online portal, and change the order of screens without the need for any technical knowledge.
This is done by the Scala script talking to a VBScript that in turn gets the data for the current page.
The trick is the use of the OnNotification function. Using this function you can tell the Scala script to jump to a certain location when a variable has changed.
Take the following OnNotification function and stick it into the first “Group:” before the “Sequence:” begins. Then set “VARIABLE” to anything you want. “VARIABLE” is then shared with a VBScript. When ever the VBScript changes “VARIABLE”, the OnNotification function send the script to “HandleAction”.
OnNotification("VARIABLE", Use("HandleAction"));
Then put the following :”HandleAction” event within the first Group Sequence. Perhaps at the bottom of the script.
The following example shows how if “VARIABLE” is the name of an Event, it will be sent to this event.
:"HandleAction"
{
Sequence:
GotoExpr(VARIABLE, Bookmark(bookmark));
}
For more on Scala Infochannel database driven scripts see:
http://www.futtock.co.uk/category/scala-infochannel/
Recent Comments