Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: RalfN Newsgroups: comp.text.interleaf Subject: Creating TOC/Index using a lisp script Date: Mon, 16 Jul 2012 07:57:13 -0700 (PDT) Organization: http://groups.google.com Lines: 27 Message-ID: <4fdf683c-0d15-4d06-bb14-e9a1ee6fcaa7@googlegroups.com> NNTP-Posting-Host: 31.150.83.202 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1342450634 19670 127.0.0.1 (16 Jul 2012 14:57:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 16 Jul 2012 14:57:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=31.150.83.202; posting-account=Z8GX-woAAAA29SCZhFNeDWtejPVYnCAA User-Agent: G2/1.0 X-Received-Bytes: 2055 Xref: csiph.com comp.text.interleaf:7 Hello, I'm new to Lisp and programming. Currently I'm using a few macro-api functions from QS 2.0 for some smaller tasks. Some of these tasks have to do with editing index documents. Now I would like to combine creating the index document and doing the editing tasks. That means moving away from "Book -> Index..." and instead create an index document using a lisp script. I found some code for creating a toc, but for Ileaf 5. Because I had read somewhere that TOC and Index have similar syntax, I tested the following lines (ILeaf 6 and QS 2.0; the script into "System -> Custom -> Selection"): (defun create-toc-for-all (container) ;creates a TOC for all docs in the conainer (let (children child) ;get all the unselected children (setq children (dt-children container :not-selected)) ;select them (while (setq child (pop children)) (tell child mid:set-props :selected t)) ;create table of contents for all chidren (toc-create-selected container) )) Unfortunately it does not work. It seems that there happens nothing. Are there any ideas to make it work? Any help will be greatly appreciated!