• 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
Textedit problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Textedit problems


  • Subject: Textedit problems
  • From: Kris Hermans <email@hidden>
  • Date: Mon, 19 May 2003 17:45:32 +0200

Hi,

Anyone know how to copy a word from textedit.
This is what I have:

open aFile
tell application "TextEdit"
set deTekst to text of aFile
set allPars to every paragraph of deTekst
set AppleScript's text item delimiters to {"="}
repeat with i from 1 to (count allPars)
set aLine to paragraph i of deTekst
if text item 1 of aLine = "name=" then
copy text item 1 of aLine to Naam
end if
end repeat
set AppleScript's text item delimiters to {""}
end tell

It always returns an error " cannot get text of 'path to document' "

I want to check the text if there is a word that starts with "name" in it.
If so then I want to use the name to copy later in my filemaker database.

Apparently the first step already doesn't work, so...

Can someone please help me

Thanks
_______________________________________________
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:
    • TIDs and Unicode
      • From: Shane Stanley <email@hidden>
    • Re: Textedit problems
      • From: Michael Terry <email@hidden>
    • Re: Textedit problems
      • From: Michelle Steiner <email@hidden>
    • Re: Textedit problems
      • From: Andrew Oliver <email@hidden>
    • Re: Textedit problems
      • From: Emmanuel <email@hidden>
  • Prev by Date: Summary: Sounds on OS X
  • Next by Date: Re: Quit Terminal
  • Previous by thread: Re: Applescript LetterRip Server
  • Next by thread: Re: Textedit problems
  • Index(es):
    • Date
    • Thread