Marked as: Easy
Hello,
Some text mode applications doesn't send output to stdout, but rather to stderr, or even both mixed togheter and it can be difficult to get the right data. The function SysTextScreenRead can then be quite handy, but you can only get data from the screen that is visible.
/* Read text from text mode application or command */
'@ECHO OFF'
CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
CALL SysLoadFuncs
'@DISKINFO -I'
PARSE VALUE SysCurPos() WITH row col
line = SysTextScreenRead( row - 2, 0, 80 ) /* Reading revious line */
CALL SysCurPos row, col
PARSE VALUE line WITH .'='speed .'='speed2
SAY speed
SAY speed2