Recent

Author Topic: The separator in the command line  (Read 2395 times)

jamie

  • Hero Member
  • *****
  • Posts: 6516
Re: The separator in the command line
« Reply #15 on: July 23, 2024, 10:42:39 pm »
Hmm
if you want the raw string so you can process your self..

CmdLine

Its a PChar pointer btw.

From there, you can use whatever code you wish.

The only true wisdom is knowing you know nothing

TRon

  • Hero Member
  • *****
  • Posts: 3129
Re: The separator in the command line
« Reply #16 on: July 23, 2024, 11:10:06 pm »
Hmm
if you want the raw string so you can process your self..

CmdLine

Its a PChar pointer btw.
AFAIK Nope. At least not on Linux.

cmdline uses get_cmdline which calls setupcmdline which uses argv and argc and explicitly uses the hardcoded space character to construct the pchar.
All software is open source (as long as you can read assembler)

jamie

  • Hero Member
  • *****
  • Posts: 6516
Re: The separator in the command line
« Reply #17 on: July 24, 2024, 12:05:49 am »
Not all operating systems are perfect.  :D
The only true wisdom is knowing you know nothing

TRon

  • Hero Member
  • *****
  • Posts: 3129
Re: The separator in the command line
« Reply #18 on: July 24, 2024, 12:12:01 am »
Not all operating systems are perfect.  :D
:P

But yeah not everything is 100% exactly the same.
All software is open source (as long as you can read assembler)

jamie

  • Hero Member
  • *****
  • Posts: 6516
Re: The separator in the command line
« Reply #19 on: July 24, 2024, 12:19:15 am »
The trick is to mask it so that it looks like a single parameter and then break it down in the app.
The only true wisdom is knowing you know nothing

DEN1983

  • New member
  • *
  • Posts: 8
Re: The separator in the command line
« Reply #20 on: July 24, 2024, 05:07:58 am »
Hmm
if you want the raw string so you can process your self..

CmdLine

Its a PChar pointer btw.

From there, you can use whatever code you wish.
That's great!
Handsome!
This is what you need!

I love freepascal and lazarus:
Code: Pascal  [Select][+][-]
  1. ListStrings1.adddelimitedtext(CmdLine,'\',true);
  2.  
this code works 100%% !!!

Thaddy

  • Hero Member
  • *****
  • Posts: 15505
  • Censorship about opinions does not belong here.
Re: The separator in the command line
« Reply #21 on: July 24, 2024, 10:12:57 am »
I told you so..
https://forum.lazarus.freepascal.org/index.php/topic,67932.msg524009.html#msg524009

But indeed, as long as you know the command line is inherently a PChar  - in most OS's, not all - you are free to manipulate  it by hand...
My great hero has found the key to the highway. Rest in peace John Mayall.
Playing: "Broken Wings" in your honour. As well as taking out some mouth organs.

 

TinyPortal © 2005-2018