Howto execute external file ...

BlitzMax Forums/BlitzMax Programming/Howto execute external file ...

OpenURL() should only open a external browser when available.

I think you want to use PUB.FreeProcess

Local app:String = "notepad.exe"
'Check if file exists
If FileType(app) = 1
	'Execute application
	Local process:TProcess = CreateProcess(app)
	Repeat
		Local error:String = process.err.ReadLine()
		If error <> "" Then
			Notify error
		EndIf
		If process.Status() = 0 Then Exit
	Forever
Else
	Notify "Unable to execute " + app
EndIf


For my purpose I've left out the repeat block since it was hurting performance for me. But this is how I launch external apps.