• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: 'Make new attachment' dilemma
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'Make new attachment' dilemma


  • Subject: Re: 'Make new attachment' dilemma
  • From: Shane Stanley <email@hidden>
  • Date: Wed, 27 May 2015 22:51:48 +1000

On 27 May 2015, at 10:38 pm, Yvan KOENIG <email@hidden> wrote:

I'm really puzzled.
Here the script behaves flawlessly with the original loop or with the new one which is more logical than the first one.

Brian is running the code as part of an Xcode-based app, so there might be differences in terms of activating apps and clipboard response.

While eating I had an idea for a third version :

repeat
if ((clipboard info) as text) contains "TIFF picture" then exit repeat
end repeat

Here it behaves exactly as the other two and as Shane's late one.

They're all doing similar things, although "as TIFF picture" was arguably a bit wasteful (getting all that data for nothing).

If I want to edit the handler to create other file formats, I know that I may replace NSJPEGFileType by one of these other formats : NSBMPFileType, NSGIFFileType, NSPNGFileType, and NSTIFFFileType
but I don't know if I must continue to use  |properties|:{NSImageCompressionFactor:compFactor, NSImageProgressive:false}
May you tell if I must do ?

No, there are differing properties depending for different formats. Basically, you need to look up NSBitmapImageRep in Xcode help or the Web, and look at the Bitmap image properties -- the descriptions tell you which apply to which formats. So NSImageInterlaced only applies for NSGIFFileType, for example.

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: 'Make new attachment' dilemma
      • From: Yvan KOENIG <email@hidden>
References: 
 >Re: 'Make new attachment' dilemma (From: Brian Christmas <email@hidden>)
 >Re: 'Make new attachment' dilemma (From: Shane Stanley <email@hidden>)
 >Re: 'Make new attachment' dilemma (From: Brian Christmas <email@hidden>)
 >Re: 'Make new attachment' dilemma (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: 'Make new attachment' dilemma
  • Next by Date: Re: 'Make new attachment' dilemma
  • Previous by thread: Re: 'Make new attachment' dilemma
  • Next by thread: Re: 'Make new attachment' dilemma
  • Index(es):
    • Date
    • Thread