HowTo:ScriptKeyPresses

From S2PLOT

Revision as of 05:36, 19 February 2008; view current revision
←Older revision | Newer revision→
Jump to: navigation, search

How to "script" key presses for S2PLOT

S2PLOT provides a very basic mechanism for "scripting" key presses.

The environment variable S2PLOT_EVENTFILE can be used to name a file whose lines are of the format:

  • Lines beginning with a hash "#" are comment lines and are ignored.
  • Lines of the format "k time keys" where time is a floating point value in seconds indicating the time at which "keys" should be simulated as pressed. "keys" is a list of standard keyboard characters, including alphanumeric characters, space and punctuation characters.

The "time" value can be negative. In this case, all keypreses with negative times are "pressed" before the first frame is generated. This is one way to initialise the visualisation to a particular state, depending on the individual S2PLOT program.

This system will be enhanced in the future. A current and serious limitation is that anything which effects the rendering speed of the program (eg. slower/faster graphics card / computer; saving frames for a movie; ...) will affect the progress through the animation and change the number of frames between key events.

Personal tools