Anyway to Access Raw Commandline?

Discuss any general programming issues here
Post Reply
NathanH
Posts: 128
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

Anyway to Access Raw Commandline?

Post by NathanH »

Hi,

I have need to access the raw command line residue without using the parsing functionality of GetCommandLine(). I then thought that I could just use the GetFileArgument() instead but it gives an error if there are spaces so quotes are required. I would need the capability of quotes within those quotes which makes that an untenable workaround. Is there a way to get the raw command line without using quotes? If not, that's another one on the wish list. Thanks.

NathanH
plouf
Posts: 666
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Anyway to Access Raw Commandline?

Post by plouf »

you need spacing ?
GetRawArguments() fit your needs?
Christos
NathanH
Posts: 128
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

Re: Anyway to Access Raw Commandline?

Post by NathanH »

Absolutely! Need to read the whole guide file sometime. Thanks!

NathanH
NathanH
Posts: 128
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

Re: Anyway to Access Raw Commandline?

Post by NathanH »

Hi,

I rolled out v10 to try GetRawArguments() but it doesn't give me the commandline; it does parsing of the commandline and strips quotes. It also interprets ">" as a redirection character which is unwanted behavior. Is there a way to get the commandline in raw form with no processing whatsoever? Best I've got so far is using GetFileArgument() but that requires the user to enclose their info in quotation marks. That makes the input harder than it needs to be for them. It also means they can't provide quotes in their input. Thanks.

NathanH
NathanH
Posts: 128
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

Re: Anyway to Access Raw Commandline?

Post by NathanH »

Hi,

I'm thinking this might be an impossibility. Please correct me if I'm wrong. I think I'll need to use GetFileArgument() with quotes and have the user use single quotes inside when they mean double quotes that I can then replace. Bummer. I didn't think this was gonna be a problem. Or use a console prompt for input. Thanks.

NathanH
plouf
Posts: 666
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Anyway to Access Raw Commandline?

Post by plouf »

NathanH wrote: Thu May 04, 2023 8:34 pm. It also interprets ">" as a redirection character which is unwanted behavior.
NathanH
I think its the os who does the > stuff also | etc.
Also i dont think tou can pass a megabyte in command line (as said to pass over entire manual) there is a limit in size
1/2 k or something

You need to ise a console input command later imho
Christos
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Anyway to Access Raw Commandline?

Post by airsoftsoftwair »

NathanH wrote: Thu May 04, 2023 8:34 pm I rolled out v10 to try GetRawArguments() but it doesn't give me the commandline; it does parsing of the commandline and strips quotes. It also interprets ">" as a redirection character which is unwanted behavior. Is there a way to get the commandline in raw form with no processing whatsoever?
No, that's not possible. GetRawArguments() is the lowest argument level on offer. This returns exactly what the OS passes to the program's entry code. Things like ">" and quotes are all handled by the console so there's no way to get them, not even for non-Hollywood programs.
NathanH
Posts: 128
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

Re: Anyway to Access Raw Commandline?

Post by NathanH »

Thanks, I was suspecting that was the case.

NathanH
Post Reply