Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Program Solution#1
#1
Solves reading * in Command$ returning concatenated filelist:

Code: (Select All)
Print Command$(0)
C$ = Read.Command$
Print "Commandline="; C$
End

Rem get command$
Function Read.Command$
  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
  Read.Command$ = cmd$
End Function
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Program Solution#5 eoredson 5 539 10-21-2025, 07:59 AM
Last Post: bplus
  Program Solution#4 eoredson 0 459 06-18-2025, 03:32 AM
Last Post: eoredson
  Program Solution#3 eoredson 1 485 06-17-2025, 04:16 AM
Last Post: SierraKen
  Program Solution#2 eoredson 0 423 06-16-2025, 04:19 AM
Last Post: eoredson

Forum Jump:


Users browsing this thread: 1 Guest(s)