Opening a File with a specific Program

BlitzMax Forums/BlitzMax Programming/Opening a File with a specific Program

Hardcoal(Posted March) [#1]
Hi.. Im trying to open a file, lets say for example a Note.txt with a specific program..

How can I do that via blitzmax code?

I know about OpenURL..but this only indicates a file to be opened
but it doesnt define with which to open with..

Rergards


Hardcoal(Posted March) [#2]
Ok ive managed to do so by using system_ like this example..

system_("D:\MyFiles\Programming\BlitzMax\HCGameEngine\Externals\KeyNote\keynote.exe D:\MyFiles\Programming\BlitzMax\HCGameEngine\Docs\docs.knt")

but now my main program gets stuck for some reason..
any exaplantion?

Tnx


grable(Posted March) [#3]
Since system_() is an implementation of system(), a libc function. It has to follow its spec and share its console AND wait for the process to terminate, giving you the process exit code in return.
To get around that, you can use CreateProcess in PUB.FreeProcess, though it does way more than you need.

Heres some win32 code doing basically the same thing as system_() just without waiting for the process.



Hardcoal(Posted March) [#4]
Tnx Grable