PDA

View Full Version : Recorder file loading automatically


nan battaglia
11-12-2004, 02:56 PM
Does anyone know if there is a way to load a "filename.rec" file into Annotator as the module gets opened?
I've tried (load "defaults.rec") both in my am_customize fille and the sd_customize file. Neither has been successful.
Thanks

Andy Poulsen
11-12-2004, 03:39 PM
Hi Nan,

Rather than loading the .rec file directly, I would recommend that you simply copy the relevant information to a file with a .lsp extension (for example "my-code.lsp"). You could then just add a line like (load "<pathname>/my-code.lsp" :if-does-not-exist nil) to your am_customize file. The ":if-does-not-exist nil" part of the command just allows your am_customize file to continue loading even if the requested file is not found. Otherwise, you'll get an error and the rest of your am_customize file will not be loaded.

When working with recorder files, selectively copying and editing the relevant information is a good (and frequently necessary) approach, as there are often user interactions (such as mouse clicks, etc) that are captured but frequently don't really have much meaning for what you want to do (and often will give unexpected results).

I hope this helps!

Good luck!

andy

Wolfgang
11-15-2004, 09:32 AM
(load "defaults.rec")


have to work. It can be loaded in the same way as a lisp file (file extension does not matter).


What are the errors displayed?

What's wrong?

Try it with a simple recorder file:
record
display "hello World"

and try to include that recorder file by the load command mentioned above.

What's going on/wrong then?

May be you can post the recorder file you want to load.

nan battaglia
11-15-2004, 09:52 AM
I've tried loading the default.lsp in am_customize and I get an error message when I launch Annotation.
Error message: "Called action routine must not request interactive input".

Andy Poulsen
11-15-2004, 09:59 AM
That error is very common when trying to load recorder files directly. As mentioned earlier in this thread, it's often necessary with recorder files to copy only the relevant information that you need (and remove any lines that deal with user interaction).

If you'd like to post your default.lsp, we can help you locate the problem.

Good luck!

andy

nan battaglia
11-15-2004, 10:02 AM
Attached is the default.lsp file I wish to load with am_customize.
Thanks for your help.

Andy Poulsen
11-15-2004, 12:35 PM
The error message is a result of loading the defaults.lsp file from the am_customize file -- OSDM thinks it's excecuting code, and the recorder file records commands as though they were typed in on the command line.

I've attached a modified version of the file that wraps the commands in the (sd-call-cmds ...) function, which is found in the :oli package i.e. (oli::sd-call-cmds ...).

OSDM expects these types of functions to be called using (sd-call-cmds ...) when executing code. Several lines in the original had to be deleted or slightly modified to make the commands work with (sd-call-cmds ...), but for the most part very few changes needed to be made.

I hope this helps!

andy