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

Re: Textedit problems


  • Subject: Re: Textedit problems
  • From: Emmanuel <email@hidden>
  • Date: Mon, 19 May 2003 18:37:10 +0200

At 5:45 PM +0200 19/05/03, Kris Hermans wrote:
>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 don't know TextEdit (I use Smile instead, un logiciel gratuit et francophone :-), but since you've opened the document, couldn't you address the paragraphs of the window? Sort of:

---------------------------
repeat with i from 1 to (count paragraphs of window 1)
set aLine to paragraph i of window 1
---------------------------

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: 
 >Textedit problems (From: Kris Hermans <email@hidden>)

  • Prev by Date: Re: Attaching a PDF using Entourage and FileMaker
  • Next by Date: Re: Applescript LetterRip Server
  • Previous by thread: Textedit problems
  • Next by thread: Re: Textedit problems
  • Index(es):
    • Date
    • Thread