Starts an external application
Supported Platforms: Windows and Mac OS
(startapp appcmd [file])
Type: String
Application to execute. If appcmd does not include a full path name, startapp searches the directories in the PATH environment variable on Windows for the application and the equivalent on Mac OS.
Type: String
File name to be opened.
Type: Integer or nil
A numeric value greater than 0, if successful; otherwise nil.
The following code starts Notepad and opens the acad.lsp file.
(startapp "notepad" "acad.lsp") 33
If an argument has embedded spaces, it must be surrounded by literal double quotes. For example, to edit the file my stuff.txt with Notepad, use the following syntax:
(startapp "notepad.exe" "\"my stuff.txt\"") 33
The following code starts TextEdit and opens the acad.lsp file.
(startapp "textedit" "acad.lsp") 33
If an argument has embedded spaces, it must be surrounded by literal double quotes. For example, to edit the file my stuff.txt with TextEdit, use the following syntax:
(startapp "textedit.app" "\"my stuff.txt\"") 33