Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to do photos in AppleScript?



I haven't tried this myself, but I guess you need to declare the TIFF Picture type as a value type, declare it in the .sdef as something like:

<value-type name="TIFF Picture" code="TIFF">
  <cocoa class="NSData" name="Image"/>
</value-type>

(I'm not sure the TIFF code, it must be consistent with other occurrences of this type though). I think that if you have an accessor for the TIFF data of the image this could work. 

Christiaan

On 27 Jul 2007, at 11:54 PM, Daniel Jalkut wrote:

On Jul 27, 2007, at 5:29 PM, Mike Zornek wrote:

What should the type be?

Are there any example Cocoa apps out there that have image attributes?

You've run up against the frustration of where AppleScript's types end and custom app-defined types begin.

If you look inside iChat's dictionary, you find that it defines TIFF Picture as essentially backed up by "NSData".

Not sure what this means for how (or if) scripters can usefully manipulate the TIFF Picture with data from outside of the app (e.g. from a disk file).

Generally I think what you would do is expose a class like "TIFF Picture" such that it included a property like "data path" or something, so users could do something like "make new TIFF Picture with properties {data path:myPictureFilePath}".

I'm pretty rough on this stuff myself, though.

D

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-implementors/email@hidden

This email sent to email@hidden

References: 
 >Re: How to do photos in AppleScript? (From: Mike Zornek <email@hidden>)
 >Re: How to do photos in AppleScript? (From: Daniel Jalkut <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.