• 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: Simple newbie question: saving a file as type text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Simple newbie question: saving a file as type text (From: "Alden Lavizzo" <email@hidden>)

  • Prev by Date: Re: Get current working directory
  • Next by Date: Re: scripting Apple Mail.app
  • Previous by thread: Simple newbie question: saving a file as type text
  • Next by thread: InDesign and Text Styles and Fonts
  • Index(es):
    • Date
    • Thread