• 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: Gary Lists <email@hidden>
  • Date: Fri, 23 May 2003 21:57:40 -0400

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

--
Gary

Incoming replies are auto-deleted.
Please post directly to the list or newsgroup.
_______________________________________________
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: find a string in a file
      • From: Emmanuel <email@hidden>
References: 
 >Re: find a string in a file (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: Finder error duplicating AppleWorks file
  • Next by Date: understanding dictionaries
  • Previous by thread: Re: find a string in a file
  • Next by thread: Re: find a string in a file
  • Index(es):
    • Date
    • Thread