Open application from BMX

BlitzMax Forums/BlitzMax Programming/Open application from BMX

daaan(Posted 2006) [#1]
How can I run an application from a blitzmax application?

Something Like this (example): RunFile( FilePath$ )? I can't find anything.

Thanks.


skidracer(Posted 2006) [#2]
try this:
system_ "notepad"



Dreamora(Posted 2006) [#3]
system_(executable:string)
or local process:TProcess = createprocess(executable:string)

depending if you want your bm app to wait or to go on.


daaan(Posted 2006) [#4]
One thing I should have mentioned. I'm running on a macbook pro and the Intel version of max does not have TProcess and the system_ "application" is a no go also. Is there another way to do it?

Thanks.


Dreamora(Posted 2006) [#5]
No not unless you wrap yourself a "mac api call".


daaan(Posted 2006) [#6]
Damnit.


Yan(Posted 2006) [#7]
I'm running on a macbook pro and the Intel version of max does not have TProcess
Are you sure, baring in mind that it's undocumented?

It should be be in '.../mod/pub.mod/freeprocess.mod'


Anyway, you should be able to use...
system_ "open /Applications/Calculator.app"
(stolen straight from the wiki)


daaan(Posted 2006) [#8]
@Yan - Thanks!


D4NM4N(Posted 2006) [#9]
Is there a way of using createprocess for a URL bearing in mind various browsers.