[Pythonmac-SIG] suggestions for an appscript FAQ

has hengist.podd at virgin.net
Sat Mar 15 22:13:07 CET 2008


Henning Hraban Ramm wrote:

> Perhaps more FAQs:
>
> << 1 >>
> Why does this work:
> 	document = InDesign.make(new=k.document)
> 	document.save(to=ComposedFile(path))
>
> but not this:
> 	document = InDesign.make(new=k.document).save(to=ComposedFile(path))

Seems to work on CS3. What are you expecting it to do vs. what is it  
actually doing?


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

Application-specific problems are outside the scope of appscript's  
FAQ, but I'm going to add a "I'm having trouble scripting <name of  
app>. What do I do now?" topic (suggested on rb-appscript-discuss)  
pointing users to appropriate forums (AppleScript-users, etc.) as a  
general cover-all.


> << 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_()


Definitely needs disambiguation. Added to the list, thanks.

has
-- 
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net



More information about the Pythonmac-SIG mailing list