How can I use WAVE 's menu variables in a script or other program?

See WAVE 's default menu file for examples of passing WAVE 's menu variables as command-line arguments to other programs.

Click on \ovalbox{\rule[-.3mm]{0cm}{2.5mm}\small\sf ~Export variables~} in WAVE 's Analyze window if you need to use these variables within a shell script. (If you are not using bash, ksh, or sh, edit the WAVE menu file first to select the alternate definition of this action.) Once the variables have been exported, they may be used in the same way as any other environment variables within your shell scripts. For example, the time of the left edge of the signal window is $LEFT. Within a C program, read the values of these variables using getenv; for example, getenv("LEFT") returns the (string) value of the time of the left edge of the signal window. Note that the exported values are only a snapshot of the variables at the time you click on \ovalbox{\rule[-.3mm]{0cm}{2.5mm}\small\sf ~Export variables~}; the values do not track later actions performed within WAVE .

George B. Moody (george@mit.edu)
2014-03-13