Page 1 of 1 1
Topic Options
#81858 - 2003-09-18 02:15 PM @SCRIPTEXE improvement request in 4.22RC1
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Ruud:

We have two macros with regards to KiXtart scripts that return the path and the name of the current script. However, with regards to the KiXtart executable running these scripts we only have the new @SCRIPTEXE macro.

Would it be possible to also introduce a @SCRIPTEXEPATH macro that denotes the directory the KiXtart executable is located in? Alternatively, just return the full path inthe @SCRIPTEXE macro and we can then parse out either the pathname or the executable name.
_________________________
There are two types of vessels, submarines and targets.

Top
#81859 - 2003-09-26 12:17 AM Re: @SCRIPTEXE improvement request in 4.22RC1
Ryan Offline
Fresh Scripter

Registered: 2001-11-11
Posts: 42
Loc: the Netherlands
Jens,

How about @StartDir? This returns the "Directory from which KiXtart was started", as the manual says.

Ryan

Top
#81860 - 2003-09-25 02:19 PM Re: @SCRIPTEXE improvement request in 4.22RC1
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
startdir shall give you the initial start point.
so, if kix is called via commandline at c:\, startdir will be c:\ even though the kix and script can be where ever.

scriptexepath is only half true as it gives the dir.
it should also give the filename.
running:
c:\scripts\mykix32.exe

can't be recognized otherwise.
I think this comes back to the request of @commandline.
it's the simpliest thing and it has so much info on it.
_________________________
!

download KiXnet

Top
#81861 - 2003-09-25 03:09 PM Re: @SCRIPTEXE improvement request in 4.22RC1
Ryan Offline
Fresh Scripter

Registered: 2001-11-11
Posts: 42
Loc: the Netherlands
I'm not really shure about that. In all my tests @StartDir points to the KiX32.exe directory. No matter where it's located.

Command line:
C:\>"C:\Program Files\KiXtart\KIX32.EXE" "C:\Temp\Test.KiX"

Test.KiX:
? @StartDir
? @ScriptExe Chr(9) @Pid
? @ScriptDir
? @ScriptName
? @CurDir

In my case @StartDir returns "C:\Program Files\KiXtart", @CurDir points to command prompt location, "C:\" in my case.

Or if i place KiX32.exe in the system32 dir,

Command line:
C:\>KIX32.EXE "C:\Temp\Test.KiX"

In that case @StartDir returns "C:\WinNT\System32", @CurDir points to command prompt location, "C:\" in this case.

Do you get the same results?

Top
#81862 - 2003-09-26 01:40 AM Re: @SCRIPTEXE improvement request in 4.22RC1
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4567
Loc: USA
I know it's not a pretty macro [Razz] , but I could modify KixStart.bat to include this info if anyone would find it useful.
Top
Page 1 of 1 1


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

Who's Online
0 registered and 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.055 seconds in which 0.025 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