Re: preflighting a file
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.