open files code example

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
tomtoo
Posts: 46
Joined: Wed Oct 28, 2009 10:00 pm

open files code example

Post by tomtoo »

may I have one?

I use newlisp all the time to interact with other applications, say, to open an editor with a newlisp-generated file--I'd like to see if the editor is already running with said file open, and if it is, do nothing, or rerun my script, etc. I can do this in an awkward way by calling ps with exec, but I was wondering if there was a newlisp-only solution.

thanks!

(where has everybody been, btw? traffic around here has been kind of low lately...)

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Re: open files code example

Post by cormullion »

Don't think there's a way in newLISP. You could perhaps see if the 'fuser' command is available and run that with exec, but it's scarcely better than what you're doing now...

Perhaps everyone's on holiday... :)

Locked