Run script from within a script

Post Reply
gerry.odea
Posts: 98
Joined: Fri Sep 19, 2008 9:33 am

Run script from within a script

Post by gerry.odea »

Is there a way to call a texis script from another texis script.

Like if I have one texis script called search and then want to call texis scripts called header and footer.

The reason I'm asking is my script is currently 300K and I want to make it much smaller.

Thanks
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Run script from within a script

Post by Kai »

The best way to cut down on script file size to make it manageable is to use modules: https://docs.thunderstone.com/site/vort ... dules.html

The easiest is just to name the module as a file, e.g.:

<script language=vortex>
<uses myModule=myFile.vs>
...

This will include code from the file `myFile.vs'. Any function in that module that is PUBLIC or EXPORT would be callable by this script (the file with the `<uses ...>' statement). An EXPORT function, while callable from other scripts that <uses> it, is not callable from the command line or web like a PUBLIC function is. Thus functions that you want to keep private from the outside world, but usable by scripts that include the script with <uses>, should be EXPORT.
Post Reply