Page 1 of 1 1
Topic Options
#188643 - 2008-07-09 08:32 PM kix2exe
kelp7 Offline
Starting to like KiXtart

Registered: 2002-08-12
Posts: 124
Loc: UK
Hi,

Not sure if this is quite the right place to ask but I've written a script that makes use of the @STARTDIR macro in Kix. This is great, it doesn't matter where my script is run, it will Open files from the right place as the long as the files are in the same folder as my script (and wkix32.exe). If I compile the script to exe using kix2exe the @STARTDIR doesn't return correct information anymore. Instead it points to the Documents & Settings folder etc etc... Is this fixable?

Cheers
Ben

Top
#188644 - 2008-07-09 08:56 PM Re: kix2exe [Re: kelp7]
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
I think what happens when you run an exe from kix or in this example, the script itself, it will default to the %temp% folder for file execution. So.. What you want to use rather thand @STARTDIR or @SCRIPTDIR, you will want to use a specific folder.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#188645 - 2008-07-09 09:37 PM Re: kix2exe [Re: Kdyer]
kelp7 Offline
Starting to like KiXtart

Registered: 2002-08-12
Posts: 124
Loc: UK
Hmm, if I use a specific folder it means I always have to force the user to run my script (or compiled .exe) from a specific static place? Could be a disadvantage that, but still, it's worth doing if it means I can get an executable going instead of having to rely on a user dragging the kix script onto wkix32.exe to get it to run
Top
#188646 - 2008-07-09 09:45 PM Re: kix2exe [Re: kelp7]
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
You maybe able to get away with something like..
 Code:
    CALL @ldrive+'newscript\drv.kix'


Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#188647 - 2008-07-09 10:10 PM Re: kix2exe [Re: Kdyer]
kelp7 Offline
Starting to like KiXtart

Registered: 2002-08-12
Posts: 124
Loc: UK
Thanks, may try that \:\)

Don't suppose you know about KixForms too?? \:\) Have a query for that also...

Ben

Top
#188648 - 2008-07-09 10:54 PM Re: kix2exe [Re: kelp7]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
 Originally Posted By: kelp7
it's worth doing if it means I can get an executable going instead of having to rely on a user dragging the kix script onto wkix32.exe to get it to run


Drag? Any reason you don't do a file association and just double-click the file with the assigned extension? Easy to create/edit/delete with the Associate UDF. You could even create your own file extension/association (.XIK) if you don't want users running random .KIX scripts.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#188649 - 2008-07-09 11:04 PM Re: kix2exe [Re: Glenn Barnas]
kelp7 Offline
Starting to like KiXtart

Registered: 2002-08-12
Posts: 124
Loc: UK
Unfortunately I can't authorise any file-association, so I want everything to be as clean and easy as possible (hence the compiling into an .exe)
Top
#188662 - 2008-07-10 03:37 PM Re: kix2exe [Re: kelp7]
Senser Offline
Fresh Scripter
*****

Registered: 2005-05-26
Posts: 32
Loc: The Netherlands
Ben, You can use the $K2E_EXEPath variable to point to the location of the executable.

More information here: http://kix2exe.ramonitor.nl/variables.php
_________________________
Kix2Exe - Kixtart Script Packager - Check : http://kix2exe.ramonitor.nl

Top
#188683 - 2008-07-10 11:08 PM Re: kix2exe [Re: Senser]
kelp7 Offline
Starting to like KiXtart

Registered: 2002-08-12
Posts: 124
Loc: UK
 Originally Posted By: Senser
Ben, You can use the $K2E_EXEPath variable to point to the location of the executable.

More information here: http://kix2exe.ramonitor.nl/variables.php


Hey,

Well, I won't necessarily know the location of the executable. That was my original problem. Someone using my compiled script may decide to put it anywhere on any drive, without compiling to exe the @STARTDIR works fine to pass to the script which folder the script has been run from. Ah well, I'm probably going to have to force the users to store it in a particualr folder \:\)

Thanks anyway

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
0 registered and 1183 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.042 seconds in which 0.021 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