Page 1 of 1

Compile/Run Options - Executable Commandline

Posted: Fri Jun 27, 2025 9:51 am
by swissbob
I have been using PureBasic for years but I have never had occasion to use this option before....

The compiled console application is working correctly with calls to ProgramParameter correctly returning the values as expected, but I can't get it to run in the IDE.

I enter the value in the 'Executable Commandline' text box but get nothing but an empty string back with I run the program from the IDE. I have tried:
- Listing the values as I would on the command line: --xxx -f -v abc
- Listing them in single quotes as a string: '--xxx -f -v abc'
- Listing them in double quotes as a string: "--xxx -f -v abc"
- Listing them in individual quotes as a string: "--xxx" "-f" "-v" "abc"

In each case the call to ProgramParameter returns an empty string

Give the maturity of the product, I'm assuming it's user error, but I'm stumped as to what I'm doing wrong....

Thanks.

Re: Compile/Run Options - Executable Commandline

Posted: Sat Jun 28, 2025 3:00 pm
by HeX0R
Works as expected here (PB6.21 x64 Win11):

Executable Commandline:

Code: Select all

--xxx -f -v abc
Code:

Code: Select all

For i = 0 To CountProgramParameters() - 1
	Debug ProgramParameter(i)
Next
Result:

Code: Select all

[15:57:00] --xxx
[15:57:00] -f
[15:57:00] -v
[15:57:00] abc