February 21, 200323 yr I wrote this snippit of elisp while messing about with the .SCF files. It is brutally simple and won't cope with anything 'cept for N lat and W lon, although you could trivially modify it to taste. You could also easily change how much it changes the loading boundaries by.To use it on a whole lot of files at once, fire up dired and make a keystroke macro to load each one in turn and call modscf. I did 35 in about 3 seconds that way.Hope it's useful to somebody.Oh, and don't laugh too hard, my elisp was unused for some 15+ years :) but like falling off a bicycle, you don't manage to ever quite forget.John/madmaxPS - looks like the board software is gonna remove the indentation, but what the heck, it should still work, and I'm too lazy at the moment to package it up for an upload!(defun modscf-replace (fn) (re-search-forward "[0-9]+") (let ((val (string-to-int (buffer-substring (match-beginning 0) (match-end 0))))) (replace-match (int-to-string (funcall fn val)))))(defun modscf () (interactive) (undo-boundary) (save-excursion (goto-char (point-min)) (re-search-forward "load lower left") (modscf-replace '1-) (re-search-forward "n") (modscf-replace '1+) (re-search-forward "load upper right") (modscf-replace '1+) (re-search-forward "n") (modscf-replace '1-)))
February 21, 200323 yr Man, that takes me back. Fortunately, I DID forget ;-)[h3]Ken Salter (aka SaltyDog)[/h3]Fly! Forum Moderator[link:members.ud.com/services/teams/team.htm?id=5E79C613-0A60-4A3B-BDC1-F9EE49F2D4FE]Join the AVSIM Online Cancer Fight!!
February 21, 200323 yr Hehe - I'd have to say that it wouldn't completely surprise me if somebody, somewhere, had implemented an entire flight simulator in elisp :)'Tis a pity - they don't even seem to teach most of the young'uns lisp any more!John/madmax/over-the-hill lisp hacker
February 21, 200323 yr When I learned it many moons ago, it was used to teach recursion.[h3]Ken Salter (aka SaltyDog)[/h3]Fly! Forum Moderator[link:http://www.grid.org/services/teams/team.htm?id=5E79C613-0A60-4A3B-BDC1-F9EE49F2D4FE]Join the AVSIM Online Cancer Fight!!
Create an account or sign in to comment