Re: Textedit problems
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.