help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling COM object from lisp


From: Syver Enstad
Subject: Re: Calling COM object from lisp
Date: 15 Nov 2002 08:52:29 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Peter Lee <pete_lee@swbell.net> writes:

> Is it possible ?  If so where can I find a sample of instantiating and
> using an
> 
> object from lisp.

I would advice you to use Python and Pymacs for that. Pymacs is an
extension for scripting emacs with Python. win32all is a collection of
Python packages and modules to work with various win32 based
technologies. Pymacs is very easy to work with and makes it a snap to
call Python from lisp.

Example:

Lisp:
Somwhere in .emacs (or another init file)
(pymacs-load "mymodule" "mymodule-") 

In your source.
(mymodule-call-com-object param1 param2)


Python:
In module mymodule.py

from win32com.client import Dispatch
def call_com_object(param1, param2):
    obj = Dispatch('InternetExplorer.Application')
    obj.Navigate('http://www.python.org')

-- 

Vennlig hilsen 

Syver Enstad


reply via email to

[Prev in Thread] Current Thread [Next in Thread]