04-14-2025, 11:12 PM
I don't really don't want to parse the command line and place the values in an array and recombine the returned array...
What I needed was simply the entire command line such as this:
What I needed was simply the entire command line such as this:
Code: (Select All)
Rem $Dynamic
DefLng A-Z
x$ = readCommand$
Print x$
End
Function readCommand$
Declare Library
Function GetCommandLineA%& ()
End Declare
Dim m As _MEM, ms As String * 1000
a%& = GetCommandLineA
m = _Mem(a%&, Len(ms))
ms = _MemGet(m, m.OFFSET, String * 1000)
If a%& Then
cmd$ = ms
eol = InStr(cmd$, Chr$(0))
If eol Then
cmd$ = Left$(cmd$, eol - 1)
End If
' parse off program name.
eol = InStr(2, cmd$, Chr$(34)) + 1
cmd$ = Mid$(cmd$, eol)
End If
_MemFree m
readCommand$ = cmd$
End Function
