IonicWind Software

Creative Basic => General Questions => Topic started by: Allan on October 17, 2008, 06:34:42 PM

Title: SYSTEM cbasic.exe draw.cba problem
Post by: Allan on October 17, 2008, 06:34:42 PM
I am unable to get SYSTEM to function as I understand it in the Help file.
Is there something I am not seeing in the code, please?

Code snippet...
' file in current folder ...
CBString = getstartpath + "sys1.cba"
' The following works but is not what I NEED to do !!!!
' SYSTEM CBString

' different file ...
' CBString = "C:\Program Files\Ionic Wind\Creative BASIC\samples\draw.cba"

' I NEED The following to work  !!!! (Opens Creative Basic but NOT the CBSring file)
SYSTEM "C:\Program Files\Ionic Wind\Creative BASIC\cbasic.exe", CBString

' does not work in long hand ...
' SYSTEM "C:\Program Files\Ionic Wind\Creative BASIC\cbasic.exe", "C:\Program Files\Ionic Wind\Creative BASIC\samples\draw.cba"


Allan
Title: Re: SYSTEM cbasic.exe draw.cba problem
Post by: Ionic Wind Support Team on October 17, 2008, 08:28:16 PM
Creative IDE doesn't support opening files from the command line directly unless using DDE, such as double clicking on an extension, or using the start command with the command prompt

start draw.cba

The original reason for this was to prevent a blank .cba file from always opening when the program was started.  And the fact it would be rare to use it directly from a command line ;)

Paul.
Title: Re: SYSTEM cbasic.exe draw.cba problem
Post by: Ionic Wind Support Team on October 17, 2008, 08:30:18 PM
However, I can modify it to support it, if you really need it for something.
Title: Re: SYSTEM cbasic.exe draw.cba problem
Post by: Allan on October 17, 2008, 09:13:29 PM
I do need it.

But I think there is another way to open files in progs other than SYSTEM.

I will see if I can dig it up and try it instead.

ShellExecuteExA(info)

Allan
Title: Re: SYSTEM cbasic.exe draw.cba problem
Post by: Ionic Wind Support Team on October 17, 2008, 09:18:15 PM
That would work, with the "open" verb.  Which uses the registry and DDE.