Command ProgramParameter not retrieving parameter ???

Just starting out? Need help? Post your questions and find answers here.
forgottencoder
User
User
Posts: 12
Joined: Sun Jul 21, 2019 1:46 am

Command ProgramParameter not retrieving parameter ???

Post by forgottencoder »

Code: Select all


;call your program test
;and type on command line "test %asa" and you will get "asa" not "%asa" for 1st parameter ???

OpenConsole()
Result$ = ProgramParameter(0)
PrintN(Result$)
Input()
CloseConsole()


I am using version 5.70 and windows 7 64bits. I forgot to mention earlier that i have purebasic 5.70 32 bits installed :)
Last edited by forgottencoder on Sun Jul 21, 2019 9:43 am, edited 1 time in total.
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Command ProgramParameter not retrieving parameter ???

Post by BarryG »

forgottencoder wrote:I am using version 5.70
Works as expected with 5.71 beta 2. I get "%asa" shown.
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Command ProgramParameter not retrieving parameter ???

Post by mk-soft »

Works fine with PB v5.70
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
forgottencoder
User
User
Posts: 12
Joined: Sun Jul 21, 2019 1:46 am

Re: Command ProgramParameter not retrieving parameter ???

Post by forgottencoder »

Not working on purebasic 5.70 32 bits.
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Command ProgramParameter not retrieving parameter ???

Post by mk-soft »

32 bit Version is right, but

You can't use [%]asa inside a Batch file!
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
forgottencoder
User
User
Posts: 12
Joined: Sun Jul 21, 2019 1:46 am

Re: Command ProgramParameter not retrieving parameter ???

Post by forgottencoder »

So that's why. mk-soft i confirm that i was using a batch file with % to execute the program with parameter.
I went thru command line and it's working. Ta-Da. Learning everyday.

Thanks everybody for the help :)
Post Reply