![]() |
| ||||||||||||||||||
![]() |
| ||||||||||||||||||
|
Especially Linux users like to run programs in a console, often even remotely from another machine or as a batch job.
YASARA offers several ways to achieve that:
yasara -conruns YASARA in console mode. The head-up display is also shown and can be scrolled with <CursorUp> and <CursorDown>. If you run a macro that issues a Wait command, you have to press <Space> to interrupt it and return to the console. This is the method of choice for running YASARA interactively without graphics, e.g. from a remote computer via SSH. When you want to run YASARA in the background
(with output redirected to a file) or from another program, you need to activate plain text mode:
yasara -txtNOTE: Text output is only visible in Linux and MacOSX. In Windows, it is always redirected to the file stdout.txt, which unfortunately prevents interactive use of YASARA in plain text mode. In Linux and MacOSX, you can also redirect output to a file as usually and run in the background while executing MyMacro.mcr:
yasara -txt MyMacro.mcr >MyLog.log 2>&1 &or (depending on the shell you use) yasara -txt MyMacro.mcr >& MyLog.log &Some exotic shells my also require this expression: (yasara -txt MyMacro.mcr >& MyLog.log &) IMPORTANT: make sure that your macro ends with 'Exit',
otherwise YASARA waits for input in the background, which results in the error message
"*** Error: getline(): not interactive, use stdio". This approach has one disadvantage: things written to the file MyLog.log will not appear there immediately,
but only once in a while when the operating system's output buffer runs full and is flushed. So you cannot check progress by looking at MyLog.
YASARA therefore provides another option:
yasara -txt MyLog.log MyMacro.mcr >/dev/null 2>&1 &This way YASARA writes all the output to MyLog.log, which is also flushed permanently. (See above for changes required by other shells). It is essential to specify the log file before the macro file,
alternatively you can also use the RecordLog
command inside the macro. If your macro switches the console
off, only minimal output will be written to the log. For Windows users,
the command looks almost the same:
Yasara.exe -txt MyLog.log MyMacro.mcr
| ||||||||||||||||||