[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: processes.lisp
- From: firstname.lastname@example.org (Bill St. Clair)
- Date: Fri, 25 Jun 1993 16:12:09 -0600
>Date: Fri, 25 Jun 1993 15:52:53 +0100
>To: MCL Bulletin Board <email@example.com>
>From: "Vincent Keunen" <firstname.lastname@example.org>
>There is no author name in the file... Who wrote it? It's great!
>However, I am wondering how I can launch an app then *come back* to mcl
>immediately. Ie something like (progn (select-applelink) (select-mcl)) ?
>It does not work. Anybody has an idea?
>I asked too quickly. It actually works but you have to insert a delay:
>(progn (select-applelink) (sleep 5) (select-mcl))
>I don't know why it is so...
I wrote "processes.lisp". Sorry I forgot to give myself credit.
You've got to wait until MCL is no longer the front process before
doing (select-mcl). Your 5 second delay will probably work for most apps,
but it would be better to wait for MCL to not be front-most first:
(defun ensure-application-active (creator)
(if (find-process creator)
(let* ((foreground *foreground*)
(filename (launch-creator creator)))
(when (and filename foreground)
(unless *foreground* (return)))