Has, thanks a lot for your help. I use Tiger Mac 10.4. Could I ask you, is it possible for me to get new version or binary version? As I run the MacPython script, it now can make new document and make new textframe which place a small rectangle on the left coner of the document created. It might be better if using myTextFrame1= id.make(new=k.text_frame, at=myDoc.pages[1], with_data=["6p0","6p0","38p0","38p0"], with_properties=geometric_bounds)
But I am not sure if it is in right form for both with_data and with_properties. Anyone knew? The error message is as following. > /Users/zpeng/Documents/projects/has.py(15)?() -> myTextFrame.geometric_bounds.set(["6p0","6p0","18p0","18p0"]) (Pdb) n CommandError: appscript.CommandError(app(u'/Applications/Adobe InDesign CS2/Adobe InDesign CS2.app').documents[u..._bounds.set, ((['6p0', '6p0', '18p0', '18p0'],), {}), <exceptions.TypeError instance at 0x1375c38>) > /Users/zpeng/Documents/projects/has.py(15)?() -> myTextFrame.geometric_bounds.set(["6p0","6p0","18p0","18p0"]) (Pdb) n > /Users/zpeng/Documents/projects/has.py(16)?() -> except Exception, e: (Pdb) n > /Users/zpeng/Documents/projects/has.py(17)?() -> print str(e) (Pdb) n Too many direct arguments. Failed command: app(u'/Applications/Adobe InDesign CS2/Adobe InDesign CS2.app').documents[u'Untitled-2'].spreads.ID(146).pages.ID(151).text_frames.ID(179).geometric_bounds.set(['6p0', '6p0', '18p0', '18p0']) > /Users/zpeng/Documents/projects/has.py(19)?() -> myTextFrame.contents.set("InDesign Doc") (Pdb) n CommandError: appscript.CommandError(app(u'/Applications/Adobe InDesign CS2/Adobe InDesign CS2.app').documents[u...frames.ID(179).contents.set, (('InDesign Doc',), {}), <exceptions.TypeError instance at 0x13798c8>) > /Users/zpeng/Documents/projects/has.py(19)?() -> myTextFrame.contents.set("InDesign Doc") (Pdb) n Zhi --- has <[EMAIL PROTECTED]> wrote: > Zhi Peng wrote: > > >But Corresponding MacPython code does not work well > >where I used appscript 1.1 (3.7 MB). Should I use > >other version of Appscript? > > Probably would be a good idea. If you're on Panther > you'll need to build it from scratch, I'm afraid, > though I can supply binaries for Jaguar and Tiger. > (I should have a copy of Panther next month.) > > > >Following is the information I used debug. > > > > > >(Pdb) n > >CommandError: > >appscript.CommandError(app(u'/Applications/Adobe > >InDesign CS2/Adobe InDesign > >CS2.app').documents[1...ext_frames[1].contents.set, > >(('set the frame',), {}), <exceptions.TypeError > >instance at 0x13fd0d0>) > > Wouldn't mind knowing a bit more about the TypeError > within that CommandError, if you could get its > string representation instead; e.g.: > > try: > > cs.documents[1].pages[1].text_frames[1].contents.set("set > the frame") > except Exception, e: > print str(e) > > Thanks, > > has > -- > http://freespace.virgin.net/hamish.sanderson/ > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig