• 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: preflighting a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: preflighting a file


  • Subject: Re: preflighting a file
  • From: Emmanuel <email@hidden>
  • Date: Tue, 19 Feb 2002 08:34:46 +0100

At 4:45 AM +0100 19/2/02, Shane Stanley wrote:

>> set theFile to open for access (choose file)
>> set theData to read theFile
>> close access theFile
>> if "CalGray" is in theData then display dialog "I wouldn't if I were you..."
>>
>> (Accepting of course that limiting the read command - with something like
>> 'for 4024' - might still be required where large files may be involved.)
>
>As long as theData is never more than 32K, that should work.

Sorry for probably asking the obvious, but I do not understand what it is
that will not work beyond 32K.

Only the method with the AppleScript's text item delimiters may break for
long strings (specially if they are full of "Calgray"'s!).

Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: preflighting a file
      • From: Shane Stanley <email@hidden>
References: 
 >Re: preflighting a file (From: Kai Edwards <email@hidden>)
 >Re: preflighting a file (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: URL Access 2.3 sucks
  • Next by Date: Re: preflighting a file
  • Previous by thread: Re: preflighting a file
  • Next by thread: Re: preflighting a file
  • Index(es):
    • Date
    • Thread