|
From: Ethan M. <merritt@u.washington.edu> - 2005-01-03 20:18:09
|
On Tuesday 28 December 2004 02:10 pm, Jacques Bouchard wrote: > > It works well. There is just one thing that could be improved. As I said > in my last message, in batch mode, each time a binded key is pressed, a > "pause -1" is eaten if the binded command contains: > > set terminal x11 > > Doesn't that prevent you to reactivate a x11 terminal as many times as > you wish with the "bind all" technique? Is it possible to correct that > seemingly wrong behavior? This may be very difficult. But if I understood better what your application needs to do, maybe I could suggest or create a way around the problem. When you say "batch mode" do you mean: gnuplot inputfile.dat or gnuplot < inputfile.dat or gnuplot gnuplot> load "inputfile.dat" or something else I haven't thought of? For me, the 1st and 3d methods work as expected, but the 2nd method does not. If you must use the 2nd method, perhaps you could use a loop-until-ready construct like this? main script: set mouse n=1; set term x11 n; plot x**n n=2; set term x11 n; plot x**n bind all Home "n=MOUSE_KEY_WINDOW; set term x11 n; plot x**n" bind all End "DONE = 1" DONE = 0 print "Hit <End> in any plot window to continue" load "wait_for_End" File wait_for_End would contain two lines: pause -1 if (!DONE) reread Or maybe it would have to be "pause mouse key" or "pause 1" or I don't know exactly what would fit in with your intended use. > A further step forward would be to allow the user to "bind all" mouse > events. For example, a left button press is unused for 2D graphs, and > would be a very natural way to reactivate a x11 terminal. But of course > that is not essential and probably not worth a difficult patch. > > Thank you again. > -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |