[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: interpreter access

Thomas Fechner wrote:
> I want to clearify my wishes. I want to send a command to the IDL
> interpreter from some program (mostely widgets) and this command should
> be remembered with the JOURNAL command as all other commands which I
> type at the IDL prompt.
> Interpreter calls with call_procedure, call_function are not listed. Ok,
> every print output is in the log file but commented out and it will be a
> solution with some additional work. Any other ideas ?
> Thomas
> -------------------------------------------------------------------------
> Thomas Fechner                                       tfechner@aip.de
> Astrophysikalisches Institut Potsdam
> An der Sternwarte 16

Ok: *that's* much easier than actually putting the text on the command
The JOURNAL command accepts an argument which is interpreted as the
journal file name if no journal file is opened and interpreted as text
to put into the journal file
if it is open. With the !JOURNAL system variable you can do the test

Here is a piece of code that should demonstrate what you need to do:

; cmdstr is the string you receive from your external call

if not !journal then begin
   ; assume that you want to stop if you can't find the journal file
   ; note it is not possible to append to an existing file unless you
   ; write your own journaling routines
   Message,'Journal file not open!',/Continue

Viele Gruesse,

[[ Dr. Martin Schultz   Max-Planck-Institut fuer Meteorologie    [[
[[                      Bundesstr. 55, 20146 Hamburg             [[
[[                      phone: +49 40 41173-308                  [[
[[                      fax:   +49 40 41173-298                  [[
[[ martin.schultz@dkrz.de                                        [[