TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: AfricaAD on June 15, 2005, 01:41:40 PM

Title: Read-Only Variable
Post by: AfricaAD on June 15, 2005, 01:41:40 PM
Is there a variabe to automatically open files as read-only?
Title: Read-Only Variable
Post by: mohobrien on June 15, 2005, 02:50:40 PM
You could change the file to read only then open it
(command ".shell" (strcat "attrib " file-name " +r"))
(command ".open" file-name "y")

then take the read only off
(command ".shell" (strcat "attrib " file-name "-r"))
Title: Read-Only Variable
Post by: CADaver on June 15, 2005, 02:53:01 PM
Not that we could find earlier, but Mark Thomas, our fearless leader and expert shoveler, provided a lisp function that when combined with a profile to auto-load and run it, makes all subsequent openings read-only.

Look HERE (http://www.theswamp.org/phpBB2/viewtopic.php?p=24635#24635)
Title: Read-Only Variable
Post by: AfricaAD on June 15, 2005, 04:58:21 PM
Just simply change the open command on a specific profile to load this lisp?

This is a handy tool, but could also be harmfull to the PM's.