Page 1 of 1 1
Topic Options
#159576 - 2006-03-22 09:03 AM Start kix code inside kix
mima Offline
Hey THIS is FUN

Registered: 2002-01-25
Posts: 217
Loc: Jönköping, Sweden
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


Top
#159577 - 2006-03-22 09:20 AM Re: Start kix code inside kix
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
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.

Top
#159578 - 2006-03-22 09:22 AM Re: Start kix code inside kix
mima Offline
Hey THIS is FUN

Registered: 2002-01-25
Posts: 217
Loc: Jönköping, Sweden
Thanks Richard

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

Top
#159579 - 2006-03-22 09:39 AM Re: Start kix code inside kix
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
I would recommend call if you are using the same version for each script.
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 294 anonymous users online.
Newest Members
MacduMela, karimKix, NicoK, Kelly001, MichaelK72
17776 Registered Users

Generated in 0.087 seconds in which 0.063 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org