Multiuser Lingo Dictionary > Multiuser Lingo Dictionary > createScript()

 

createScript()

Syntax

createScript(whichString {, #whichType })

Description

Multiuser Server server-side function; creates a script object compiled from the specified string. The string must contain Lingo code in order to become a script object.

#WhichType is an optional symbol indicating the type of script to create. Specify #parent to create a parent script. Specify #global to create a global script. Handlers in global scripts are available to all Lingo running on the server. The default type is #parent.

Example

These statements read the file Testscript.ls and create a script object on the server from the string contained in the file:

scriptText = file("Testscript.ls").read()
scriptObject = createScript(scriptText)

See also

read()