Page 1 of 1

[Done] Set paramaters in IDE for a console application

Posted: Thu Apr 22, 2021 6:59 pm
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

Re: Set paramaters in IDE for a console application

Posted: Thu Apr 22, 2021 8:19 pm
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:

Re: Set paramaters in IDE for a console application

Posted: Thu Apr 22, 2021 10:39 pm
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.

Re: Set paramaters in IDE for a console application

Posted: Thu Apr 22, 2021 11:46 pm
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!!

Re: Set paramaters in IDE for a console application

Posted: Fri Apr 23, 2021 6:13 am
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)
:(

Re: Set paramaters in IDE for a console application

Posted: Fri Apr 23, 2021 8:38 am
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...

Re: Set paramaters in IDE for a console application

Posted: Fri Jul 22, 2022 8:59 pm
by JoseT
Now, with PB 6.0 LTS, problem persists... I was hoping and hoping that this problem would be corrected in the next version, but it wasn't.

It's a letdown, when I bougth PB (a tool for develop software in Mac, Linux and Windows) I thought that it had a serious support, but Im seen that support is only for Windows user :(

Re: Set paramaters in IDE for a console application

Posted: Sat Jul 23, 2022 12:32 pm
by mk-soft
JoseT wrote: Fri Jul 22, 2022 8:59 pm Now, with PB 6.0 LTS, problem persists... I was hoping and hoping that this problem would be corrected in the next version, but it wasn't.

It's a letdown, when I bougth PB (a tool for develop software in Mac, Linux and Windows) I thought that it had a serious support, but Im seen that support is only for Windows user :(
I tried it here for the first time. Unfortunately it does not work.

You are wrong here. Of course, Fred doesn't only take care of Windows. He also takes care of macOS and Linux, and since recently also Raspberry PI.

Please also test beta versions and report such errors.
(Or take a look at the IDE code and help the community with the projects.)

Re: Set paramaters in IDE for a console application

Posted: Tue Jul 26, 2022 7:33 pm
by JoseT
Please also test beta versions and report such errors.
(Or take a look at the IDE code and help the community with the projects.)
Thanks, thanks a lot for this wonderful suggestions!

I wish all companies offered this service to their customers.

Re: Set paramaters in IDE for a console application

Posted: Wed Nov 01, 2023 4:59 pm
by Fred
Fixed.