all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Open existing instance of app from Emacs lisp?
@ 2008-08-09  0:29 David Wolff
  2008-08-09 12:42 ` B. T. Raven
  0 siblings, 1 reply; 5+ messages in thread
From: David Wolff @ 2008-08-09  0:29 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

I used "w32-shell-execute" to open apps, documents, and folders in a
very nice little menu, eg:

     (w32-shell-execute "open" "C:/WINDOWS/System32/calc.exe")

Then I discovered that, for applications, this always opens a new
instance instead of switching to an existing copy.  Just what I need, 14
copies of Calculator running.  :-)

So okay, I can use w32-window-exists-p to see if the app is already
running.  Now is there a way to activate the app from lisp?

Thanks --

David

(Remove "xx" to reply.)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Open existing instance of app from Emacs lisp?
  2008-08-09  0:29 Open existing instance of app from Emacs lisp? David Wolff
@ 2008-08-09 12:42 ` B. T. Raven
  2008-08-12  2:25   ` David Wolff
  0 siblings, 1 reply; 5+ messages in thread
From: B. T. Raven @ 2008-08-09 12:42 UTC (permalink / raw)
  To: help-gnu-emacs

David Wolff wrote:
> Hi all,
> 
> I used "w32-shell-execute" to open apps, documents, and folders in a
> very nice little menu, eg:
> 
>      (w32-shell-execute "open" "C:/WINDOWS/System32/calc.exe")
> 
> Then I discovered that, for applications, this always opens a new
> instance instead of switching to an existing copy.  Just what I need, 14
> copies of Calculator running.  :-)
> 
> So okay, I can use w32-window-exists-p to see if the app is already
> running.  Now is there a way to activate the app from lisp?
> 
> Thanks --
> 
> David
> 
> (Remove "xx" to reply.)

Apparently someone called XSteve (an Austrian??) has put together 
"sww.exe" and sww.el that will do what you want. Google on these. I 
wasn't able to try them because I am missing mfc71.dll and I don't know 
where to download it safely. If you have this dll you will probably be 
able to switch between windows apps from within Emacs. The closest I can 
get to what you want is:

(if (not (w32-window-exists-p nil "Calculator"))

   (w32-shell-execute "open" "C:/Winnt/System32/calc.exe"))

and then use Alt-Tab to bring up calculator.

By the way, the calc programs (simple and programmable) embedded within 
Emacs are far superior to the msw Calculator program.

Ed


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Open existing instance of app from Emacs lisp?
  2008-08-09 12:42 ` B. T. Raven
@ 2008-08-12  2:25   ` David Wolff
  2008-08-12  2:56     ` Ian Swainson
       [not found]     ` <mailman.16433.1218509611.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: David Wolff @ 2008-08-12  2:25 UTC (permalink / raw)
  To: help-gnu-emacs

In article <WvqdnTMnNKJWDQDVnZ2dnUVZ_hydnZ2d@sysmatrix.net>,
B. T. Raven <nihil@nihilo.net> wrote:
> David Wolff wrote:
> > Hi all,
> > 
> > I used "w32-shell-execute" to open apps, documents, and folders in a
> > very nice little menu, eg:
> > 
> >      (w32-shell-execute "open" "C:/WINDOWS/System32/calc.exe")
> > 
> > Then I discovered that, for applications, this always opens a new
> > instance instead of switching to an existing copy.  Just what I need, 14
> > copies of Calculator running.  :-)
> > 
> > So okay, I can use w32-window-exists-p to see if the app is already
> > running.  Now is there a way to activate the app from lisp?
> > 
> > Thanks --
> > 
> > David
> > 
> > (Remove "xx" to reply.)
> 
> Apparently someone called XSteve (an Austrian??) has put together 
> "sww.exe" and sww.el that will do what you want. Google on these. I 
> wasn't able to try them because I am missing mfc71.dll and I don't know 
> where to download it safely. If you have this dll you will probably be 
> able to switch between windows apps from within Emacs. The closest I can 
> get to what you want is:
> 
> (if (not (w32-window-exists-p nil "Calculator"))
> 
>    (w32-shell-execute "open" "C:/Winnt/System32/calc.exe"))
> 
> and then use Alt-Tab to bring up calculator.
> 
> By the way, the calc programs (simple and programmable) embedded within 
> Emacs are far superior to the msw Calculator program.

Thanks.  I found "sww.exe" and hope to not have to install a new .exe,
but I'll consider it.

I'm sure Emacs calc is superior, but for simple addition and subtraction
I didn't feel like learning yet another user interface...

Thanks --

David

(Remove "xx" to reply.)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Open existing instance of app from Emacs lisp?
  2008-08-12  2:25   ` David Wolff
@ 2008-08-12  2:56     ` Ian Swainson
       [not found]     ` <mailman.16433.1218509611.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Ian Swainson @ 2008-08-12  2:56 UTC (permalink / raw)
  To: David Wolff; +Cc: help-gnu-emacs

On Tuesday 12 August 2008 at 02:25 PM, dwolffxx@panix.com (David Wolff) wrote:
> I'm sure Emacs calc is superior, but for simple addition and subtraction
> I didn't feel like learning yet another user interface...

M-x calculator is IMHO much superior to ms's calculator app - and you
don't have to leave Emacs. No other user interface to learn - works the
same as the Windows one. M-x calc is a different beast - very powerful
but perhaps overkill for what you want.

Cheers,
ian

-- 
Ian Swainson

fortune says:
To err is human, to forgive unusual.

This email was crafted using GNU/Linux | http://www.getgnulinux.org




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Open existing instance of app from Emacs lisp?
       [not found]     ` <mailman.16433.1218509611.18990.help-gnu-emacs@gnu.org>
@ 2008-08-13  0:53       ` David Wolff
  0 siblings, 0 replies; 5+ messages in thread
From: David Wolff @ 2008-08-13  0:53 UTC (permalink / raw)
  To: help-gnu-emacs

In article <mailman.16433.1218509611.18990.help-gnu-emacs@gnu.org>,
Ian Swainson  <ian.swainson@datacom.co.nz> wrote:
> On Tuesday 12 August 2008 at 02:25 PM, dwolffxx@panix.com (David Wolff) wrote:
> > I'm sure Emacs calc is superior, but for simple addition and subtraction
> > I didn't feel like learning yet another user interface...
> 
> M-x calculator is IMHO much superior to ms's calculator app - and you
> don't have to leave Emacs. No other user interface to learn - works the
> same as the Windows one. M-x calc is a different beast - very powerful
> but perhaps overkill for what you want.

In my copious free time, I'll look into it.

Also "calc.exe" was just one example of the apps I'm using.

Thanks --

David

(Remove "xx" to reply.)


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-13  0:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-09  0:29 Open existing instance of app from Emacs lisp? David Wolff
2008-08-09 12:42 ` B. T. Raven
2008-08-12  2:25   ` David Wolff
2008-08-12  2:56     ` Ian Swainson
     [not found]     ` <mailman.16433.1218509611.18990.help-gnu-emacs@gnu.org>
2008-08-13  0:53       ` David Wolff

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.