Re: Simple newbie question: saving a file as type text
Re: Simple newbie question: saving a file as type text
- Subject: Re: Simple newbie question: saving a file as type text
- From: kai <email@hidden>
- Date: Mon, 3 Oct 2005 01:06:04 +0100
On 2 Oct 2005, at 22:54, Alden Lavizzo wrote:
I've tried the following script which is intended to open an
AppleWorks 6 database and save it as a text file. The script opens
the file and saves it, but the result is not a text file, it
appears to be an AppleWorks 6 file. I could use a little help, or
an alternate way to do it.
Here's the script:
tell application "AppleWorks 6"
open file "Macintosh HD:Users:liquid:Desktop:Movie DB.cwk"
save document 1 in file "Macintosh HD:Users:liquid:Temp:Movie
DB.txt" as file type "TEXT"
quit
end tell
It's probably only the file's creator type that is now preventing it
from being regarded as a regular text file, Li. Try something like:
-----------
set tgt to "Macintosh HD:Users:liquid:Temp:Movie DB.txt"
tell application "AppleWorks 6"
open file "Macintosh HD:Users:liquid:Desktop:Movie DB.cwk"
save document 1 in file tgt as file type "TEXT"
quit
end tell
tell application "Finder" to set file tgt's creator type to "ttxt"
-----------
---
kai
_______________________________________________
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