Re: read a specific word of a text file
Re: read a specific word of a text file
- Subject: Re: read a specific word of a text file
- From: Michelle Steiner <email@hidden>
- Date: Thu, 23 Sep 2004 01:11:02 -0700
On Sep 23, 2004, at 12:58 AM, Jasneet Kaur wrote:
So could you please help me do that using AppleScript with the
constraint
that there can be no user intervention, that is the dialog box doesn't
appear... rather, the words to be replaced can be hard coded into the
script.
Here's the full script:
set x to "word_to_be_replaced"
set y to "word_to_replace_with"
set foo to open for access file "disk:folder:folder:file" with write
permission
set bar to read foo
set {tid, text item delimiters} to {text item delimiters, x}
set barlist to text items of bar
set text item delimiters to y
set z to barlist as text
set text item delimiters to tid
set eof of foo to 0
write z to foo
close access foo
--
Never play strip Tarot.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden