Hello,
TLDR: I will appreciate your help in figuring out how to detect (using gnuplot script commands) whether a gnuplot script runs in batch mode or has been loaded from the gnuplot console.
On Windows, the installer associates gnuplot with the file associations .gp . Thus I can save gnuplot commands to a .gp file and by double clicking this script file, a graph window opens (but no console). That's what I call "batch mode".
Alternatively, those script files can be loaded on the gnuplot console using the "load" command (or dragging&dropping them on the console window).
However, when running in batch mode, the terminal "qt" requires the command "pause mouse close" at the end of the batch file to keep the graph window interactive, see bug #2600
When this script file is loaded from the gnuplot console, however, the "pause mouse close" prevents interactivity on the gnuplot console until the graph window is closed.
Thus I'd like to conditionally execute this pause mouse close" command when the batch file is loaded in batch mode only.
Is this possible?
Thanks.
Daniel
The documentation says:
I don't use Windows so I can't say for sure whether ctrl-C works as stated. Did you try?
Thanks, Ethan, pressing ctrl-C on the console does the trick.