该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


Run Program() enables you to control a program that uses standard input and standard output. Line-mode programs read commands from stdin and write answers to stdout. cmd.exe, the Windows command prompt, is one example. You can also use it to launch GUI programs, such as Windows Notepad.
Executable( "cmd.exe" ),
Options( {"/c", "TaskList\!n"} ),
Read Function( "text" ) // return all text
图 8.3 Log Output
You can also print the task list directly without using cmd.exe and then import the task list into a data table.
blob = Run Program(
Executable( "tasklist.exe" ),
Column( "Image Name", Character, "Nominal" ),
Column(
"PID",
"Continuous",
Format( "Best", 10 )
Column( "Session Name", Character, "Nominal" ),
Column(
"Session#",
"Continuous",
Format( "Best", 10 )
Column( "Mem Usage", Character, "Nominal" ),
Fixed Column Widths( 26, 9, 17, 12, 12, 63 ),
图 8.4 Imported Data from Run Program()
注意:If you use Run Program() to launch a GUI program, JMP is inoperable until you close the program.