Launch another app from my standalone

Jim Bufalini jim at visitrieve.com
Sun Aug 30 05:10:39 EDT 2009


Adrian Williams wrote:

> Still having the error 'NilObjectException the application must shut
> down' when using the 'launch' command.
> Looks like the target app to launch is producing the error on Windows
> Vista.
> Here is the relevant code that tries to launch...
> 
> set the defaultFolder to it
> launch "MyProgram.exe"
> launch it
> 
> The docs say "...To work with a Unix process, use the shell function
> instead."
> 
> get shell("start MyProgram.exe")
> 
> So should I be using this instead?
> Any ideas about this error?

Stop using "it."  Your code snippet does not show what "it" is set to. What
is the default folder being set to? What are you launching? Why do you have
two launch statements?

Try:

Put the defaultFolder into tOrigDefaultFolder
Set the defaultFolder to "C:\theDirTheExeIsIn" -- Put actual dir the EXE is
in here
Launch "MyProgram.exe" -- Put the actual name of the exe here
Set the defaultFolder to tOrigDefaultFolder -- Puts the defaultFolder back
where it was

Aloha from Hawaii

Jim Bufalini








More information about the use-livecode mailing list