home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Encyklopedia Omnia
/
Planeta.iso
/
data
/
0_credit.dir
/
00008_Script_DanGetCommandArgs
< prev
Wrap
Text File
|
2000-11-09
|
724b
|
26 lines
on DanGetCommandArgs
-- API Declaration:
-- Declare Function GetCommandLine Lib "kernel32" () As String
GLURegister("R100-71-14080863")
set getCmdLine = new(xtra "glu32")
set err = GLUNew(getCmdLine,"kernel32","GetCommandLine","S","V",0,0)
set cmdLine = GLUCall(getCmdLine)
-- parse cmdLine to extract the arguments
if cmdLine starts QUOTE then
delete char 1 of cmdLine
set startChar = offset(QUOTE,cmdLine) + 1
else
set startChar = offset(SPACE,cmdLine) + 1
end if
-- lTrim
repeat while char startChar of cmdLine = " "
set startChar = startChar + 1
end repeat
set cmdArgs = char startChar to length(cmdLine) of cmdLine
return cmdArgs
end