How detect if an application fails to launch

Eric Chatonet eric.chatonet at sosmartsoftware.com
Wed Dec 14 08:40:25 EST 2005


Hi Jason,

Check first if the file/folder does exists :-)

switch
   case IsOSX() -- then apps are folders
     if there is a folder <complete path to app> then launch  
<complete path to app>
     else AnswerErr "App not found." -- custom handler
   break
   default-- then apps are files
     if there is a file <complete path to app> then launch <complete  
path to app>
     else AnswerErr "App not found." -- custom handler
end switch
-------------------------------------
function IsOSX
   set the itemDelimiter to "."
   if the platform = "MacOS" and item 1 of the systemVersion >= 10
   then return true
   return false
end IsOSX

Best Regards from Paris,
Eric Chatonet
------------------------------------------------------------------------ 
----------------------
http://www.sosmartsoftware.com/    eric.chatonet at sosmartsoftware.com/


Le 14 déc. 05 à 14:26, Jason (Polydiam) a écrit :

> I'm trying to run an outside application
> With the following code
>
> launch "myapp.exe"
>
> Is there a way of catching if the application isn't found and not  
> run so I
> can make a dialog box telling the user that it failed?




More information about the Use-livecode mailing list