Set paramaters in IDE for a console application

Post bugs related to the IDE here
JoseT
New User
New User
Posts: 9
Joined: Sun Dec 06, 2020 11:27 am

Set paramaters in IDE for a console application

Post by JoseT »

Hi all,

Please, is possible set values for parameters of a console application?
I suppose yes, but I can't see where can I set this values, and when I can test my app I need create executable and, then, run it with its parameters from a shell terminal.

(Excuse me for my English, it's very bad)

Regards,

Jose
User avatar
Marc56us
Addict
Addict
Posts: 1034
Joined: Sat Feb 08, 2014 3:26 pm
Location: France

Re: Set paramaters in IDE for a console application

Post by Marc56us »

JoseT wrote: Thu Apr 22, 2021 6:59 pm Please, is possible set values for parameters of a console application?
I suppose yes, but I can't see where can I set this values, and when I can test my app I need create executable and, then, run it with its parameters from a shell terminal.
Yes it is possible
> (menu) Compiler
> (option 7) Compiler Options
> (tab 2) Compile/Run
> (option 2) Run executable with:
> Executable Commandline
Put (all) parameter(s) like in command the line
:wink:
(English is not my native language, I use an online translator.)
JoseT
New User
New User
Posts: 9
Joined: Sun Dec 06, 2020 11:27 am

Re: Set paramaters in IDE for a console application

Post by JoseT »

Thanks a lot, Marc56us, but I must be do something wrong because I tried this but it does not work for me... I wrote the same parameters that I use in zsh terminal, in terminal they are reconigzed but not when I execute from IDE, in this case CountProgramParameters() returns 0.

Sure that error is mine, but I don't know what it's :(

By the way, I'm using MacOS Big Sur and PureBasic 5.73 LTS.
JoseT
New User
New User
Posts: 9
Joined: Sun Dec 06, 2020 11:27 am

Re: Set paramaters in IDE for a console application

Post by JoseT »

Another thing.. perhaps it's a clue.

My code tries to explore a directory and shows a limited number of files filtered by some conditions. Parameters must indicate wich is directory to explore, and how many files shows. And when I run it from IDE, I see that two shell windows are opened.

Then I tried to write three parameters in "Run executable with .. executable commandlines", and when I compile and run it, four terminal windows are opened. Three of them appears in the same directories wrote in parameters, each one window in diferent directory but the same directory wrote in parameters.

Also a fourth window is opened, and in this one it's shown the error "no parameters received".

I hope I've explained well... My English is horrible

Thanks again in advance!!
User avatar
Marc56us
Addict
Addict
Posts: 1034
Joined: Sat Feb 08, 2014 3:26 pm
Location: France

Re: Set paramaters in IDE for a console application

Post by Marc56us »

CountProgramParameters() returns 0
It's strange because I often use this option in the IDE (Windows and Linux) without any problem :?: (but I don't have a mac)
:(
(English is not my native language, I use an online translator.)
JoseT
New User
New User
Posts: 9
Joined: Sun Dec 06, 2020 11:27 am

Re: Set paramaters in IDE for a console application

Post by JoseT »

Hi again.

Today I've tested it in a Windows, and it runs successfully in Windows 10.

Perhaps it's a problem with IDE of PureBasic in MacOS...
Post Reply