Previous Topic

Next Topic

Inhoudsopgave

Book Index

Running Scripts

Description

In Isah, scripts enable you to customize standard functionalities, to create new functionalities and to link your company-specific functions to standard Isah functions. For example you can develop scripts for displaying overviews. It is possible to start the standard Isah scripts that are stored in the database via the Integration Server. The script syntax determines which information you need to enter in order to run the script. If an input parameter is specified in the script, you have to enter an input parameter. Entering a function name is only required if a function other than Main is to be run. You should always enter the script code. The user must have sufficient rights for running scripts. If this is not the case, no messages will be displayed to the user.

The following code starts the Isah script that displays the free disk space:

Dim oScript As IERPLink.IISERPScript

Set oScript = oERPLink.CreateScript

oScript.ScriptCode = "I0004"

oScript.Params.Add "sDrivePath", "C:"

MsgBox oScript.RunScript(“ShowFreeSpace”)

Isah script started by the code above: :

function ShowFreeSpace(sDrivePath)

rem -------------------------

Dim oFSO, oDrive

set oFSO = CreateObject("Scripting.FileSystemObject")

set oDrive = oFSO.GetDrive(oFSO.GetDriveName(sDrivePath))

ShowFreeSpace = "Drive " & UCase(sDrivePath) & " (" & oDrive.VolumeName & ")." & vbCRLF & _

"Free Space: " & FormatNumber(oDrive.FreeSpace/1024, 0) & " Kbytes"

end function