Page 1 of 1 1
Topic Options
#197555 - 2010-01-27 07:33 PM Calling new Kix file
efesefeldt Offline
Just in Town

Registered: 2010-01-27
Posts: 3
Loc: NY
I am having some trouble with the syntax for calling another kix file in a login script.

if ingroup ("XX")
call XX.kix
endif

I have also tried %0\..\XX.kix with the same problem.

Any help would be greatly appreciated.

Top
#197556 - 2010-01-27 07:50 PM Re: Calling new Kix file [Re: efesefeldt]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Welcome to the board.

The code below should get you going. Change the path to the script file to match your setup and all should work if the person is in the group.
You can use variables and/or macros for the path. If your called script is in the same folder as the main script you could use the @scriptdir macro to be sure the path is correct.

 Code:
If InGroup("xx")
	Call "path to script\script.kix"
	?"Error code: " @ERROR
	?"Error code text: " @SERROR
Else
	?"Not in group."
EndIf

Sleep 5
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#197558 - 2010-01-27 09:23 PM Re: Calling new Kix file [Re: Mart]
efesefeldt Offline
Just in Town

Registered: 2010-01-27
Posts: 3
Loc: NY
Mart,

The @scriptdir macro was exactly what I was looking for.

Thank you for your help.

Eric

Top
#197559 - 2010-01-28 12:55 AM Re: Calling new Kix file [Re: efesefeldt]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
You're welcome.
Good to hear everything is working ok now.

@scriptdir can also be used if the called script is deeper down in the folder structure and not in the same folder as the main script. You can add folders so you always have the base path correct.

Something like this.

 Code:
Call @SCRIPTDIR + "\folder1\folder2\script.kix"


Edited by Mart (2010-01-28 01:01 AM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 837 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.056 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

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