mima
(Hey THIS is FUN)
2006-03-22 09:03 AM
Start kix code inside kix

Hi
How do I start new kix script inside a main kix program ?
Code:

Select
Case Something1
; Run kixscript 001

Case Something2
; Run kixscript 002

EndSelect



Richard H.Administrator
(KiX Supporter)
2006-03-22 09:20 AM
Re: Start kix code inside kix

You have three options
  1. Use CALL to load the script. This will run in the same environment as your main script, and provide access to all the global environment that the main script has created such as variables and functions. The main script will wait until your called script has finished. This is normally the best solution.
  2. Use "SHELL" to start a new instance of KiXtart. This is a completely seperate environment and has no direct access to the main scripts variables or functions. The main script will pause while this script executes.
  3. User "RUN" to start a new instance of KiXtart. This is very similar to the SHELL method, except that the main script will not pause while the new script executes.


Note that options 2 and 3 will consume more memory and will have a slightly slowere startup time because of the new instance of the executable.


mima
(Hey THIS is FUN)
2006-03-22 09:22 AM
Re: Start kix code inside kix

Thanks Richard

Missed Call in my Kix documentation. Call is perfect for this.


Björn
(Korg Regular)
2006-03-22 09:39 AM
Re: Start kix code inside kix

I would recommend call if you are using the same version for each script.