• 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: Mon, 18 Feb 2002 20:00:24 +0100

At 5:16 PM +0100 18/2/02, Debbie McNerney wrote:

>I am desperately trying to find/modify an applescript (drag and drop) that
>will search for and alert a user for this CalGray type. Can someone point me
>to the right direction. I am willing to put in some work to do this for our
>people here. Just need a little direction.

Maybe not the 'copy and paste' solution that you're after but just in case ...

You would open and read the file using the read/write commands included in
the Standard Additions (check the dictionary of Standard Additions with
Script Editor).

Then you would search for the desired string using the "offset" command:

------------------------
offset of subString in bigString
------------------------

returns the rank of subString in bigString, or 0 if not found.

Basically, thus:

------------------------ untested & unverified
set theFile to open for access alias thePath -- you provide thePath
set theText to read theFile
close access theFile
if offset of "CalGray" in theText is not 0 then
-- do whatever suitable
end
------------------------

HTH
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>
    • Re: preflighting a file
      • From: Shane Stanley <email@hidden>
References: 
 >preflighting a file (From: Debbie McNerney <email@hidden>)

  • Prev by Date: Re: Program Linking via IP
  • Next by Date: Two Quark questions & a Network question
  • Previous by thread: preflighting a file
  • Next by thread: Re: preflighting a file
  • Index(es):
    • Date
    • Thread