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

Re: find a string in a file


  • Subject: Re: find a string in a file
  • From: Emmanuel <email@hidden>
  • Date: Sat, 24 May 2003 14:14:33 +0200

At 9:57 PM -0400 23/05/03, Gary Lists wrote:
>On or about 5/23/03 8:10 PM, Emmanuel wrote:
>
>> or:
>>
>> -------------------------- untested
>> set eFile to alias "EEHD:efile9.txt"
>> set fileText to read eFile
>>
>> if offset of "%%" in fileText is 0 then
>> display dialog "Not there."
>> else
>> display dialog "Found"
>> end if
>> ---------------------------------
>>
>> Emmanuel
>
>
>As written, this produced the error:
>
>Can't make 0 into a boolean.
>
>Parentheses did the trick (oddly?)
>
>Changing the if... to
>
>(offset of "%%" in fileText)
>
>worked for me. OS9.1.2, AS 1.8.3

Thanks for telling us.

Still not testing nor RTFM I understand that "is" has higher precedence than "in".

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.

References: 
 >Re: find a string in a file (From: Gary Lists <email@hidden>)

  • Prev by Date: Re: New Entourage question
  • Next by Date: URL Access/IE5.x download question...
  • Previous by thread: Re: find a string in a file
  • Next by thread: Making Word windows invisible or small
  • Index(es):
    • Date
    • Thread