PDA

View Full Version : Save & Restore Window


Jobst Brandt
03-29-2004, 03:23 PM
I would like to save a set of views of the WINDOW_1 menu to be retrieved later. I imagine the save macro could look like:

DEFINE Save_windows
OPEN_OUTFILE 1 DEL_OLD 'C:/ME10user12/mac/macs/WINDOWDT'
WRITE_FILE 1 Current_window_ll_1
WRITE_FILE 1 Current_window_ur_1
WRITE_FILE 1 Current_window_ll_2
WRITE_FILE 1 Current_window_ur_2
WRITE_FILE 1 Current_window_ll_3
WRITE_FILE 1 Current_window_ur_3
CLOSE_FILE 1
END_DEFINE

the input macro could look like this:

DEFINE Input_windows
OPEN_INFILE 1 'C:/ME10user12/mac/macs/WINDOWDT'
READ_FILE 1 NUMBER Current_window_ll_1
READ_FILE 1 NUMBER Current_window_ur_1
READ_FILE 1 NUMBER Current_window_ll_2
READ_FILE 1 NUMBER Current_window_ur_2
READ_FILE 1 NUMBER Current_window_ll_3
READ_FILE 1 NUMBER Current_window_ur_3
CLOSE_FILE 1
END_DEFINE

My problem is that these coordinates are stored as '-1,-1' strings and do not reload as number pairs. How can I retrieve them as coordinate pairs?

Jobst Brandt

Yannick Rouat
03-29-2004, 10:59 PM
You can use the VAL command

READ_FILE 1 Current_window_ll_1 LET Current_window_ll_1 (VAL Current_window_ll_1)

Yannick

Jobst Brandt
03-29-2004, 11:53 PM
Thanks Yannick,

I finally stumbled onto that after plowing through the mysterious online manual. That's what I call cryptic.

Jobst Brandt