Page 1 of 1 1
Topic Options
#80913 - 2002-06-12 09:32 AM What about @COMMANDLINE?
Flavien Offline
Getting the hang of it

Registered: 1999-07-21
Posts: 95
Loc: Geneva, Switzerland
I've seen many kixers asking for some better control of the arguments given on the command line, but Ruud could just include a @COMMANDLINE macro that we could dig in?
Top
#80914 - 2002-06-12 03:12 PM Re: What about @COMMANDLINE?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Could you please specify what you try to achieve? Do you want @COMMANDLINE to contain the command line parameters that were used in the KIX32.EXE call like
code:
KIX32.EXE /F TEST.KIX

and thus @COMMANDLINE='/F TEST.KIX' ?
_________________________
There are two types of vessels, submarines and targets.

Top
#80915 - 2002-06-12 03:42 PM Re: What about @COMMANDLINE?
Flavien Offline
Getting the hang of it

Registered: 1999-07-21
Posts: 95
Loc: Geneva, Switzerland
Yes, exactly!

Then we could write a simple parsing function to handle everything instead of having to tell everyone the correct variables...

Compare this:
kix32 script.kix $variable1="kixtart" $x=1 $y=0$file="c:\test.txt"

vs.

kix32 script.kix /v kixtart /x /-y /f "c:\test.txt"
or, even simpler:
kix32 script.kix kixtart x -y "c:\test.txt"

Looks better, doesn't it? At least it would seam easier for my guys... That would also help when creating file association with .kix files. You could then drag a file on a .kix script. Endless possibilities.

Top
#80916 - 2002-06-12 04:04 PM Re: What about @COMMANDLINE?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
so then wouldn't you have @commandline being an array

kix32 script.kix kixtart x -y "c:\test.txt"

@commandline[0]=script.kix
@commandline[1]=kixtart
@commandline[2]=x
@commandline[3]=-y
@commandline[4]=c:\test.txt
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#80917 - 2002-06-12 04:07 PM Re: What about @COMMANDLINE?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
code:
$kix="HKEY_CLASSES_ROOT\.KIX"
$kixautofile="HKEY_CLASSES_ROOT\KIX_auto_file"
Addkey("$kix")
writevalue("$kix","","KIX_auto_file",REG_SZ)
Addkey("$kixautofile")
writevalue("$kixautofile","","KiXtart Script",REG_SZ)
writevalue("$kixautofile","EditFlags","0",REG_SZ)
Addkey("$kixautofile\DefaultIcon")
writevalue("$kixautofile\DefaultIcon","","%windir%\system32\SHELL32.dll,21",REG_EXPAND_SZ)
Addkey("$kixautofile\shell")
writevalue("$kixautofile\shell","","Run",REG_SZ)
Addkey("$kixautofile\shell\Edit")
Addkey("$kixautofile\shell\Edit\command")
writevalue("$kixautofile\shell\Edit\command","","%windir%\notepad.exe %1",REG_EXPAND_SZ)
Addkey("$kixautofile\shell\Run")
Addkey("$kixautofile\shell\Run\command")
writevalue("$kixautofile\shell\Run\command","","%windir%\kix32.exe %1",REG_EXPAND_SZ)

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#80918 - 2002-06-16 01:08 AM Re: What about @COMMANDLINE?
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

See related topics
http://81.17.37.55/board/ultimatebb.php?ubb=get_topic;f=4;t=000004
http://81.17.37.55/board/ultimatebb.php?ubb=get_topic;f=4;t=000184
The idea of @commandline is also great, but its value must not
be interpretated by kixtart. For example it prevents the interpretation of
environment variables like "%tmp%".
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

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 2870 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.083 seconds in which 0.053 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