SERVER.WINDOW()

SERVER.WINDOW()

Top  Previous  Next

 

The SERVER.WINDOW() function, available only in Windows QMConsole sessions, opens an asynchronous application window.

 

 

Format

 

SERVER.WINDOW(program {, parameters})

 

where

 

programis the name of the program to be executed or the name of a file with a suffix recognised by Windows.

 

parametersis a space separated list of parameters to be passed to the program. This must be a null string or omitted if program is a data file name.

 

 

The SERVER.WINDOW() function opens an asynchronous application window to execute the program identified by the function's arguments. This might be, for example, a Word document, an Excel spreadsheet, or a Notepad text file. Note that when using a network connection to QM, this window appears on the Windows server, not the client system. A client side window can be opened using the asynchronous command execution features of a terminal emulator such as AccuTerm. The SERVER.WINDOW() function is of particular use in QMConsole sessions.

 

The return value from this function is True if it is successful, False if an error occurs. In the case of an error, the STATUS() function and OS.ERROR() functions can be used to find the cause of the error.

 

The SERVER.WINDOW() function differs from the OS.EXECUTE statement (and the corresponding SH and ! commands) in that it allows execution of a Windows GUI mode program that will have its own window on the server whereas OS.EXECUTE passes a command to the Windows command processor (cmd.exe) and shows the command output as part of the QM session.

 

 

Examples

 

OK = SERVER.WINDOW("notepad", "audit.txt")

 

This statement starts the Windows Notepad command to display or edit an item named audit.txt.

 

 

OK = SERVER.WINDOW("audit.txt")

 

This statement is an alternative way to display or edit the audit.txt file.

 

 

See also:

OS.EXECUTE