[plt-scheme] Questions about COM with MysterX

From: Tzeta Tsao (tsaotzeta at gmail.com)
Date: Fri Mar 9 11:43:08 EST 2007

Hi all,

Am learning Scheme, and computing in general, through using it. Would anyone
dispense a few pointers on how to control an application through COM with
MysterX?

I have some prior experience in using Python's win32com.client, and hope a
comparison here is not a faux pas. To launch Excel and write "hello" to a
cell, Python would be

o = win32com.client.Dispatch("Excel.Application");
o.Visible = 1;
o.Workbooks.Add();
o.Cells(1, 1).Value = "hello";

I did this with MysterX:

(define ex (cci/progid "Excel.Application.11"))
(com-set-property! ex "Visible" #t)
(define c (com-invoke (com-get-property ex "Workbooks") "Add"))

But could not get to the step of the equivalent of "o.Cells(1, 1).Value." I
could not find "Cells" with either "com-methods" or "com-get-properties."
Also, how is "o.Cells(1, 1)" expressed in MysterX? Is it "(list "Cells" 1
1)"?

Thansk,
Tzeta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070309/859bbc31/attachment.html>

Posted on the users mailing list.