scriptsave()

Description:

Save a script file of splx/spl format as one of spl/splx format.

Syntax:

scriptsave(src:ps,dst:pd,fnE,fnD)

Note:

The function automatically saves script file src as script file dst according to the file extension. Parameters src and dst are script files whose extensions are splx and splx respectively.

Parameter:

src

The source script file.

ps

When src is a .splx file, this parameter represents the cellset password for accessing the source script file.

dst

The target script file to be generated.

pd

When dst is a .splx file, this parameter is the cellset password for accessing the target script file.

fnE/fnD

When dst is a .splx file, specify the encryption/decryption method fnE/finD, which is the external static Java function byte[] for both input and output. Find more script encryption/decryption methods in Steps to Script File Encryption.

Return value:

  None

Example:

 

A

 

1

=scriptsave("p1.splx","p1.spl")

Save script file p1.splx as p1.spl.

2

=scriptsave("p2.splx":"123","p2.spl")

Save script file p2.splx having the cellset password as p2.spl encrypted by cellset password 123.

3

=scriptsave("p3.spl","p3.splx":"abc")

Save script file p3.spl as p3.splx encrypted by cellset password abc.

 

The method to encrypt/decrypt a spl/splx file as a splx/spl file:

  package com;

public class Jm {

  public static byte[] encrypt(byte[] bytes) {

  … …  //Encrypt

  }

  public static byte[] decrypt(byte[] bytes) {

  … …  //Decrypt

  }

}

Put the custom function’s class file in the path [esProc installation root directory]/esProc/classes, and use the encryption/decryption method in scrptsave() function:

 

A

 

1

=scriptsave("p5.spl","p5.splx","com.Jm.encrypt","com.Jm.decrypt")

Save script file p5.spl as p5.splx and set the encryption/decryption method.