guilmor
17th December 2002, 16:36
Hi Baanboard!

I'm trying to open a log file using NOTEPAD, after writing the file with seq.open...., calling NOTEPAD from a session program. How can I launch NOTEPAD?


Thanks.

csekhar
17th December 2002, 16:49
You can use the function app_start . There is no need to use seq.open to open the file. In the arguments instead of stdin substitute the full file name path.

Syntax

long app_start( string commandline, string directory, string stdin, string stdout, string stderr )

Description

This starts the application specified in the commandline argument. It returns an ID for the started application. You can subsequently use this ID as the app.id argument in the app_status() function.

Arguments

commandline This specifies the command that starts the application. If commandline does not include a directory path, Windows searches for the executable file in the following directories, in the order shown below:
1 The directory where BW is loaded.
2 The Windows system directory.
3 The Windows directory.
4 The directories listed in the PATH environment variable.
directory The default working directory for the application.
stdin The standard input file name.
stdout The standard output file name.
stderr The standard error file name.
Notes

If commandline specifies the name of a nonexecutable file, Windows starts the application with which the file name extension is associated. For example, if commandline is c:\temp\file.txt, and .txt is associated with the Notepad application, Windows will start Notepad. Because users can change the association of a file name extension, you cannot predict which application will start.
This functionality is not available when you specify standard input, output, and error files.

Return values

>=0 success; identification number of the started application is returned
<0 error (that is, the negative value of the system error)

Context

ttdllbw library function.

guilmor
18th December 2002, 12:49
Guilmor