[Pythonmac-SIG] suggestions for an appscript FAQ

Henning Hraban Ramm hraban at fiee.net
Sat Mar 15 00:00:38 CET 2008

Perhaps more FAQs:

<< 1 >>
Why does this work:
	document = InDesign.make(new=k.document)

but not this:
	document = InDesign.make(new=k.document).save(to=ComposedFile(path))

<< 2 >>
Why is Finder.copy not (yet) implemented? Will it soon?

<< 3 >>
Is there a generic and simple way of checking the "type" of an item  
(e.g. Finder item, InDesign page_item)?
E.g. I need to check if a Finder item is a folder or if a ID  
page_item is a text or a graphics frame.

type(item) is always <class 'appscript.reference.Reference'>
Answer for InDesign: item.class_()

<< references >>
Finder = appscript.app('Finder')
InDesign = appscript.app('Adobe InDesign CS2')

def ComposedFile(path):
     return mactypes.File(unicodedata.normalize('NFD', os.path.abspath 

Greetlings from Lake Constance!
https://www.cacert.org (I'm an assurer)

More information about the Pythonmac-SIG mailing list